![]() |
Race condition problem with jquery
I'm having trouble consistently getting the width of an element that is updated.
Here's a code snippet. I need to get the width of $newimg. You can see an attempt in line 5, var $imgwidth = $newimg.width() I've tried referring to it in a number of ways but the problem exists. If the image has already been loaded once it usually missess. I've tried a few when...then commands but got nowhere. Code:
$('<img class="fp_preview" />').load(function(){ |
| All times are GMT +1. The time now is 06:46 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.