Issue 1640 support fixed admin lnb

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10402 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2012-03-09 04:55:04 +00:00
parent 3fd2c47122
commit 30b3f96d98

View file

@ -1221,4 +1221,26 @@ jQuery(function($){
details.slideToggle(200);
viewBtn.toggleClass('details');
});
var lnb = $('div.lnb');
var h = lnb.offset().top;
function fixedLnb()
{
if(lnb.css('float') == 'none')
{
lnb.css('position', 'relative');
return;
}
if($(document).scrollTop() >= h-20)
{
lnb.css({'position':'fixed', 'top':'0px'});
}
else
{
lnb.css('position', 'relative');
}
setTimeout(fixedLnb, 100);
}
fixedLnb();
});