JQUERY - ensuring only one div ID of a particular class shows when user clicks its corresponding image and the rest are set to hide -
I have 10 images in a flash hindojal that are set to trigger jquery commands through an XML document
i.e.:
& lt; Photo image = "picture / 01.jpg" url = "javascript: toggleDetail1 ()" target = "_self" & gt; & Lt; Photo Image = "Picture / 02.jpg" url = "javascript: toggleDetail2 ()" target = "_self" & gt; Etc. ...
When a user clicks on an image, I want to make sure that only the corresponding divide of that particular image is shown and another 9 is hidden.
i 'we have given all 10 divisions in the class of "toggletime" and each device has its own ID ("extension1", "description2", etc.). Now I need to write my junkies and lose a bit.
So far it has been found at this point that when I click on an image in the carousel, I want to show it. But I do not know exactly what to do about getting another device in the 'toggletime' category to hide at that point.
& lt; Script type = "text / javascript" & gt; Function toggleDetail1 () {$ ('# bookdetail1'). Show ();} function toggleDetail2 () {$ ('# bookdetail2'). Show ();} etc ...
Do me one. Does not the selector, a statement or what needs to be used?
sorry shouldve included Html:
& lt; Div class = "toggleitem" id = "bookdetail1" & gt; & Lt; Span class = "cover" & gt; & Lt; Img src = "picture / description / 1 / cover-1.jpg" & lt; / Span & gt; & Lt; Span class = "spread" & gt; & Lt; Img src = "picture / description / 1 / spade-1.jpg" & lt; / Span & gt; & Lt; Span class = "blurb" & gt; Text lesson text lesson & Lt; / Span & gt; & Lt; / Div & gt;
Comments
Post a Comment