jQuery: Having trouble hiding/showing when a div is clicked -


I am creating a homepage with four links with four different images when one click is made I would like a new image that will be visible next to the link using jQuery's hide / show effects. Right now I am having trouble working on it.

HTML:

  & lt; Img src = "images / images / grey_shape1.png" square = "grey_shape1" /> & Lt; Img src = "picture / picture / gray_specify 2" square = "gray_shap 2" /> & Lt; Img src = "Pictures / Pictures / GrayScheap 3" class = "GrayScheap 3" /> & Lt; Img src = "picture / picture / gray_speap4png" class = "gray_speap4" /> & Lt; Div id = "green_box_container" & gt; & Lt; A href = "#" & gt; Div id = "green_box1" & gt; & Lt; Img src = "picture / lilacs_small.jpg" /> & Lt; / Div & gt; & Lt; / A & gt; & Lt; A href = "#" & gt; & Lt; Div id = "green_box2" & gt; & Lt; Img src = "picture / lilacs_small.jpg" /> & Lt; / Div & gt; & Lt; / A & gt; & Lt; A href = "#"> gt; Id = "green_box3" & gt; & Lt; Img src = "picture / lilacs_small.jpg" /> & Lt; / Div & gt; & Lt; / A & gt; & Lt; A href = "#" & gt; Div id = "green_box4" & gt; & Lt; Img src = "picture / lilacs_small.jpg" /> & Lt; / Div & gt; & Lt; / A & gt; & Lt; / Div & gt;   

* Currently I am using the same image for all 4 links - this will change later.

When a div is chosen, then I need two things. One, the selected div is slightly larger (it is already working) and two, the new image is visible. Not happening later.

jQuery:

  // This part is working fine $ ("# green_box_container a"). Click (function ($ (this height): ((height: 105, width: 105), 'medium') $ (this). Siblings (). Children (). Animate ({height: 80, width : 80}, 'Show ("normal");}}})     

Edit: There is also a Bela

I am currently working with # green_box1. All help is appreciated!

problem

JQuery shows () The element element changes the CSS display property. Since your images are hidden from visibility property, i.e. visibility: hidden , show () method, there is no effect on them Display

Code> Property :

  img {... display: none; ...}    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -