code is working in all browsers except Safari
Hi Guys,
Any idea why this code isn't working?
-
function showLightBox(r){
frame.prepend("<div class=\"l-box\"><div class=\"lb-holder\"></div></div>")
lBox = $(".l-box");
var lBoxHolder = $(".l-box .lb-holder");
lBox.css({opacity:0});
alterheight(iniheight);
lBox.animate({opacity: 1}, 400, function(){
lBoxHolder.append("<div class=\"close-button\"><a href=\"\">Close X</a></div>")
var closeBtn = $(".l-box .lb-holder .close-button");
closeBtn.css({opacity:0});
closeBtn.animate({opacity: 1}, 400, function(){
closeBtnLB($(this));
});
lBoxHolder.append("<img class=\"l-box-lrg-img\" src=\""+r+"\"");
var lrgImg = $(".l-box .lb-holder .l-box-lrg-img");
lrgImg.css({opacity:0});
lrgImg.bind("load", function(){
var scaleFactor = $(this).width()/$(this).height();
if($(this).width()>455){
$(this).width(455);
$(this).height(455/scaleFactor)
}
h = iniheight
var diff = $(this).height() - frame.height();
h = diff + (m*3)-10;
alterheight(h)
lrgImg.animate({opacity: 1}, 400)
})
})
}
The problem is that the lmgImg.bind is never called: when you place an alert in that function it does alert out on every browser except Safari.
Any ideas why this might be
Dieter