Menu
Home
Overview
Demo
Screenshots
Samples
Download
Purchase
News
Support
Support
Documentation
Documentation
Articles
Company
Contact Us
Testimonials
Affiliates
Forums
Product Support
V4 Beta - Screen resolution height recalculation
Author
Message
david
Posted: 8/13/2012
Quote message
When moving browser from monitor to monitor that have screen resolutions, the "script.js" code does not recalculate. Removing script.js lines 348 & 352 solved the problem. Modified code follows:
jQuery(function ($) {
'use strict';
jQuery(window).bind('resize', function () {
var bh = jQuery('body').height();
var mh = 0;
jQuery('#art-main').children().each(function() {
if (jQuery(this).css('position') !== 'absolute') {
mh += jQuery(this).outerHeight(true);
}
});
/* Messes up the resolution of short pages */
/* if (mh < bh) { */
var r = bh - mh;
var c = jQuery('div.art-content');
c.css('height', (c.outerHeight(true) + r) + 'px');
/* } */
});
if ($.browser.msie && parseInt($.browser.version, 10) < 8) {
$(window).bind('resize', function() {
var c = $('div.art-content');
var s = c.parent().children('.art-layout-cell:not(.art-content)');
var w = 0;
c.hide();
s.each(function() { w += $(this).outerWidth(true); });
c.w = c.parent().width(); c.css('width', c.w - w + 'px');
c.show();
});
}
$(window).trigger('resize');
});
Reply
NAME *
EMAIL
SMILIES
CODES
BODY *
[quote=david] When moving browser from monitor to monitor that have screen resolutions, the "script.js" code does not recalculate. Removing script.js lines 348 & 352 solved the problem. Modified code follows: jQuery(function ($) { 'use strict'; jQuery(window).bind('resize', function () { var bh = jQuery('body').height(); var mh = 0; jQuery('#art-main').children().each(function() { if (jQuery(this).css('position') !== 'absolute') { mh += jQuery(this).outerHeight(true); } }); /* Messes up the resolution of short pages */ /* if (mh < bh) { */ var r = bh - mh; var c = jQuery('div.art-content'); c.css('height', (c.outerHeight(true) + r) + 'px'); /* } */ }); if ($.browser.msie && parseInt($.browser.version, 10) < 8) { $(window).bind('resize', function() { var c = $('div.art-content'); var s = c.parent().children('.art-layout-cell:not(.art-content)'); var w = 0; c.hide(); s.each(function() { w += $(this).outerWidth(true); }); c.w = c.parent().width(); c.css('width', c.w - w + 'px'); c.show(); }); } $(window).trigger('resize'); }); [/quote]
VALIDATION *