Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Force hasLayout toggle
// Force hasLayout: wait til after page load, toggle zoom moments later
$.fn.hasLayout = function(){
var
$el = $(this),
zoom = function(){
$el.css('zoom','0').css('zoom','1');
},
delay = function(x){
setTimeout(x,100);
};
$().addLoad(delay(zoom));
return $el;
};
// Force hasLayout: wait til after page load, toggle zoom moments later
$.fn.hasLayout = function(){
var
$el = $(this),
zoom = function(){
$el.css('zoom','0').css('zoom','1');
},
delay = function(x){
setTimeout(x,100);
};
addLoad(function(){delay(zoom)});
return $el;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.