Guest User

Untitled

a guest
Dec 16th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /************************************
  2.   * script for maintaining the width with resolution
  3.   ************************************/
  4.   sh = screen.height;
  5.   sw = screen.width;
  6.   //alert(sw);
  7.   if(sw > 1024)
  8.   {
  9.     jQuery('#rightPanel').css({width: (sw-386)+'px'});
  10.   }
  11.   else{
  12.     jQuery('#rightPanel').css({width: '745px'});
  13.   }
  14.  
  15.   /*******************************
  16.    *  check page zoom and adjust
  17.    *  product container width
  18.   *******************************/
  19.   var zoom = document.documentElement.clientWidth / window.innerWidth;
  20.   $(window).resize(function() {
  21.       var zoomNew = document.documentElement.clientWidth / window.innerWidth;
  22.       if (zoom != zoomNew) {
  23.           // zoom has changed
  24.           // adjust your fixed element
  25.           //zoom = zoomNew
  26.           sh = screen.height;
  27.           sw = screen.width;
  28.           if(sw > 1024){
  29.             jQuery('#rightPanel').css({width: (sw-386)+'px'});
  30.           }
  31.           else{
  32.             jQuery('#rightPanel').css({width:'745px'});
  33.           }
  34.       }
  35.   });
Add Comment
Please, Sign In to add comment