Saturday, July 25, 2009

jQuery execution after image load

If you need to run JavaScript that's based on some attribute of a loaded image (e.g. height or width), use a callback with $(window).load() instead of $(document).ready().


Michael said...

Thank you! Just what I needed! Fixes Chrome and Safari delayed layout jquery issues.

Dan said...

booayh, thanks Dave's brain.

Senica Gonzalez said...

Pefect! Thanks for this!