tags:

views:

32

answers:

2

I have a widget:

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

A: 

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");
 });
});
graphicdivine
@graphicdivineThank you very much for reply. I have updated my widget with your code. But no the problem is:1- after page loading there is not any problem. all images in tab one and tab are visible.2- when you click on tab1 text and then click on tab2, now the image on tab2 is unvisible! The problem is here.
A: 

Ok! The solution is changing second id to cnb2. Because the id maybe unique! Thanks to jquery.com forum.