I have a wi开发者_如何学运维dget:
http://designer-depot.com/prob/
When clicking to tab2, the image is not visible. Its only visible when mouse over. What is my mistake in jquery or css coding. Thanks in advance
You have multiple, conflicting jQuery functions going on here. Looks like you've been experimenting with several different tutorials all at once. Your tab navigation widjet is not even getting a chance to function, as this one is triggering first:
$("#cnb li").mouseover(function(){
$("#cnb li").removeClass("crn");
$(this).addClass("crn");
});
You could probably strip out everything else in your JS file and just use:
$(document).ready(function() {
$("#cnb li").click(function(){
$("#cnb li").removeClass("crn");
$(this).addClass("crn");
});
});
Ok! The solution is changing second id to cnb2. Because the id maybe unique! Thanks to jquery.com forum.
精彩评论