滚动式固定导航
$(function () {
var ie6 = /msie 6/i.test(navigator.userAgent)
, dv = $('.news_shangto'), st;
dv.attr('otop', dv.offset().top);
$(window).scroll(function () {
st = Math.max(document.body.scrollTop || document.documentElement.scrollTop);
if (st >= parseInt(dv.attr('otop'))) {
if (ie6) {
dv.css({ position: 'absolute', top: st });
}
else if (dv.css('position') != 'fixed') dv.css({ 'position': 'fixed', top: 0 });
} else if (dv.css('position') != 'static') dv.css({ 'position': 'static' });
});
});