Code 1 is conflict with another Jquery function in the code, then I add the jQuery.noConflict()(See the Code 2). However, the function didn’t work when adding jQuery.noConflict().
Can anyone help me? Thanks in advance!
Code 1
$(document).ready(function(){
$("#insideTable > tbody > tr:odd").addClass("odd");
$("#insideTable > tbody > tr:not(.odd)").hide();
$("#insideTable > tbody > tr:odd").show();
$("#insideTable > tbody > tr.odd").click(function(){
$(this).next().toggle();
$(this).find(".arrow").toggleClass("up");
});
});
</script>
Code 2
$(document).ready(function(){
jQuery.noConflict();
$("#insideTable > tbody > tr:odd").addClass("odd");
$("#insideTable > tbody > tr:not(.odd)").hide();
$("#insideTable > tbody > tr:odd").show();
$("#insideTable > tbody > tr.odd").click(function(){
$(this).next().toggle();
$(this).find(".arrow").toggleClass("up");
});
});
</script>
try with this code.
just replace $ with jQuery and try for this. may working good.
Thanks.