jquery - Get height of image in 2nd LI -


In this code to achieve the height of the image contained in the 2nd layer, struggling to get the right jQuery ... any idea ?

  & lt; Ul class = "example" & gt; & Lt; Li & gt; & Lt; Img src = "example.jpg" width = "500" height = "500" & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; Img src = "example.jpg" width = "500" height = "500" & gt; & Lt; / li & gt; & Lt; / Ul & gt; Use    

or eq is zero-index based Therefore it starts with 0

  $ ('example li: eq (1) img'). Height ();    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -