Goodevening!
I am creating a modal, and want to wait until image-load before showing the modal, but jQuerys load() event handler has some crossbrowser issues. Is there an elegant way to void load(), like using some kind of ajax call?
When a link to an image is clicked, jQuery sends the img-tag via "content" to method.open
method.open = function (content) {
var img = $(content).attr("href");
$content.empty().append("<img src='" + img + "' />");
$(img).load(function(){
//Move show up here
//console.log("WUHU");
});
$modal.show();
Link to fiddle: http://jsfiddle.net/EUMnF/1/