页面js代码没有执行
<script>
$("#narrowBy h2").each(function () {
$(this).click(function () {
$(this).toggleClass('down').next('.options-wrap').children('.options').slideToggle('fast').next().toggle();
$(this).next('.options-wrap').css('paddingBottom', $(this).hasClass('down') ? 0 : 9);
});
});
$("#narrowBy p a:not(.more)").click(function () {
$(this).toggleClass("nsSelected");
});
</script>
JavaScript
[解决办法]
<script type="text/javascript">
$(document).ready(function () {
$(this).click(function () {
$(this).toggleClass('down').next('.options-wrap').children('.options').slideToggle('fast').next().toggle();
$(this).next('.options-wrap').css('paddingBottom', $(this).hasClass('down') ? 0 : 9);
});
});
$("#narrowBy p a:not(.more)").click(function () {
$(this).toggleClass("nsSelected");
});
</script>
[解决办法]
错了
<script type="text/javascript">
$(document).ready(function () {
$(“#narrowBy h2“).click(function () {
$(this).toggleClass('down').next('.options-wrap').children('.options').slideToggle('fast').next().toggle();
$(this).next('.options-wrap').css('paddingBottom', $(this).hasClass('down') ? 0 : 9);
});
});
$("#narrowBy p a:not(.more)").click(function () {
$(this).toggleClass("nsSelected");
});
</script>