ShopPilot > Aktuelle FAQ - H?ufige Fragen
Kriteriensuche funktioniert nicht mit neuen jquery-Scripts
(1/1)
dobra:
Hallo,
wenn man jquery mit neuen Scripten (wie es z.B. für Bootstrap im responsive-Demoshop verwendet werden muss) einbindet, funktionier die Kriteriensuche nicht mehr (die angeklickten Checkboxen werden nicht übertragen)
Ursache (sagt google):
--- Zitat --- jQuery 1.6+
Use the new .prop() function:
$('.myCheckbox').prop('checked', true);
$('.myCheckbox').prop('checked', false);
jQuery 1.5.x and below
The .prop() function is not available, so you need to use .attr().
$('.myCheckbox').attr('checked', true);
$('.myCheckbox').attr('checked', false);
--- End quote ---
Lösung:
in ajax_facet.js alle
if (!jQuery(this).hasClass('check_all')) {
if (jQuery(this).attr('checked')) {
option1[k] = jQuery(this).attr('name');
++k;
}
}
auf
if (!jQuery(this).hasClass('check_all')) { // alle ab/auswählen ignorieren
if (jQuery(this).prop('checked')) {
option1[k] = jQuery(this).prop('name');
++k;
}
}
und in finder.html
.attr("checked","checked")
auf
.prop("checked","checked")
ändern
Linkback: https://www.shoppilot.net/pf/index.php?topic=1716.0
Navigation
[0] Themen-Index
Go to full version