- Код: Выделить всё
$(function(){
$.extend($.fn.jScrollPane.defaults, {
showArrows:true,
scrollbarWidth:11
}
);
var isResizing;
// and the body scrollpane
var setContainerWidth = function()
{
// IE triggers the onResize event internally when you do the stuff in this function
// so make sure we don't enter an infinite loop and crash the browser
if (!isResizing) {
isResizing = true;
$w = $('.c1-games');
$c = $('.gamelist');
$jscpn = $('div.c1-games>div.jScrollPaneContainer');
var p = (parseInt($c.css('paddingLeft')) || 0) + (parseInt($c.css('paddingRight')) || 0);
$jscpn.css({'width': $w.width() + 'px'});
$c.css({'width': ($w.width() - p) + 'px', 'overflow':'auto'});
$c.jScrollPane();
isResizing = false;
}
}
$(window).bind('resize', setContainerWidth);
setContainerWidth();
// it seems like you need to call this twice to get consistantly correct results cross browser...
setContainerWidth();
})
Кто-нибудь уже сталкивался с такой проблемой