jquery get width of previous image
Posted
by
user1250987
on Stack Overflow
See other posts from Stack Overflow
or by user1250987
Published on 2012-11-05T22:54:20Z
Indexed on
2012/11/05
22:59 UTC
Read the original article
Hit count: 128
jQuery
So i cant get the jquery correct for this one, whatever i try it returns the wrong width. I wish to make the image within the "img-shadow" div the same size as the image right before it. Notice this will repeat several times on the page.
<p>
<img src="" alt="">
<div class="img-shadow">
<img src="" alt="">
</div>
</p>
I hope you don't shake your heads too much on at me on this one, it seems super simple, but .prev .find .closest hasn't worked for me.
Thanks!
© Stack Overflow or respective owner