Advertisement
kopilo

Basic example of ratio scaling

Jun 2nd, 2011
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* global variables */
  2. var ratio=screen.width/screen.height;
  3.  
  4. function ratio_aspect(var input) {
  5.    ratio = input;
  6. }
  7.  
  8. function ratio_height(var object, var value) {
  9.     value = value * ratio;
  10.    $("#"+object).css("width", value);
  11. }
  12.  
  13. /* events */
  14. window.onload = cssinject();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement