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
https://forums.phpfreaks.com/topic/248788-jquery-css-dillema/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.