Jump to content

Jquery .css dillema


dsp77

Recommended Posts

hello, i have a gallery that shows the hidden div after click, the problem is that i have around 20 pictures and i'm not able to hide the selected picture after the user selects other and so on. here is the piece of the code:

	$('.id2').one("click",function() {
		$('#test').css('display','block');
	});	
	$('.id3').one("click",function() {
		$('#test3').css('display','block');
	});	

and the html

					<div id="big_photo">
				<div id="test" style="display:none;">
					<img src="images/team/team1.jpg" rel="images/team/team11.jpg" />
					<p>Name</p>
					<span>title</span>
				</div>
				<div id="test3" style="display:none;">
					<img src="images/team/team2.jpg" rel="images/echipa/team22.jpg" />
					<p>Name2</p>
					<span>title2</span>
				</div>
				</div>

and so on.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.