Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /************************************
- * script for maintaining the width with resolution
- ************************************/
- sh = screen.height;
- sw = screen.width;
- //alert(sw);
- if(sw > 1024)
- {
- jQuery('#rightPanel').css({width: (sw-386)+'px'});
- }
- else{
- jQuery('#rightPanel').css({width: '745px'});
- }
- /*******************************
- * check page zoom and adjust
- * product container width
- *******************************/
- var zoom = document.documentElement.clientWidth / window.innerWidth;
- $(window).resize(function() {
- var zoomNew = document.documentElement.clientWidth / window.innerWidth;
- if (zoom != zoomNew) {
- // zoom has changed
- // adjust your fixed element
- //zoom = zoomNew
- sh = screen.height;
- sw = screen.width;
- if(sw > 1024){
- jQuery('#rightPanel').css({width: (sw-386)+'px'});
- }
- else{
- jQuery('#rightPanel').css({width:'745px'});
- }
- }
- });
Add Comment
Please, Sign In to add comment