Created
September 30, 2011 10:29
-
-
Save barneycarroll/1253391 to your computer and use it in GitHub Desktop.
Force hasLayout toggle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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