Skip to content

Commit

Permalink
Fixed preloadImages function when used with Firefox
Browse files Browse the repository at this point in the history
* Firefox returns CSS urls with surrounding quotes
  • Loading branch information
rmm5t committed Feb 28, 2010
1 parent dbdf141 commit a3ce286
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions facybox.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,14 @@
function preloadImages(){
//TODO preload prev/next ?
$('#facybox').find('.n, .close , .s, .w, .e, .nw, ne, sw, se').each(function() {
var img = new Image();
img.src = $(this).css('background-image').replace(/url\((.+)\)/, '$1');
})
// var img = new Image();
// img.src = 'images/loading.gif';
/*
TODO: remove and load preloader from filament group
*/
var img = new Image();
img.src = $(this).css('background-image').replace(/^url\(\"?/, "").replace(/\"?\)$/, "");
});
// var img = new Image();
// img.src = 'images/loading.gif';
/*
TODO: remove and load preloader from filament group
*/
}

function makeBackwardsCompatible() {
Expand Down

0 comments on commit a3ce286

Please sign in to comment.