Created
April 13, 2011 11:39
-
-
Save KarlHerler/917390 to your computer and use it in GitHub Desktop.
computes relative bg size to factual 100% even at relative sizes.
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
$(this).attr('backround-size', (10000/parseInt($("this").width())+"%")); | |
//or | |
function bgsize(width) { return 10000/width; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment