Guest User

Untitled

a guest
Jan 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function adjustStyle(width) {
  2.     width = parseInt(width);
  3.     if (width < 910) {
  4.         $("#smaller-sheet").attr("href", "thin.css");
  5.     } else if ((width >=910)) {
  6.         $("#smaller-sheet").attr("href", "style.css");
  7.     }
  8. }
  9.  
  10. $(function() {
  11.     adjustStyle($(this).width());
  12.     $(window).resize(function() {
  13.         adjustStyle($(this).width());
  14.     });
  15.      adjustStyle($(this).width());
  16.     $(window).load(function() {
  17.         adjustStyle($(this).width());
  18.     });
  19. });
Add Comment
Please, Sign In to add comment