The 1st snippet wasn't working. However, it start working when replacing all $(dollar sign) with jQuery(See 2nd snippet). But i don't really understant why? Can anyone explain this to me? Many thanks!
1st Snippet
jQuery.noConflict();
$(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");
});
});
2nd Snippet
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery("#insideTable > tbody > tr:odd").addClass("odd");
jQuery("#insideTable > tbody > tr:not(.odd)").hide();
jQuery("#insideTable > tbody > tr:odd").show();
jQuery("#insideTable > tbody > tr.odd").click(function(){
jQuery(this).next().toggle();
jQuery(this).find(".arrow").toggleClass("up");
});
});
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…