¡@

Home 

2014/10/16 ¤W¤È 12:03:21

jquery Programming Glossary: fcheight

More efficient way to handle $(window).scroll functions in jquery?

http://stackoverflow.com/questions/7392058/more-efficient-way-to-handle-window-scroll-functions-in-jquery

different and more efficient practice to get the same result window .scroll function var headerBottom 165 var fcHeight #pnlMainNavContainer .height var ScrollTop window .scrollTop if ScrollTop headerBottom #HeaderContentBuffer .attr style.. .height var ScrollTop window .scrollTop if ScrollTop headerBottom #HeaderContentBuffer .attr style margin top fcHeight px #AddFieldsContainer .attr style position fixed width 320px top 70px left 41px else #HeaderContentBuffer .attr style.. scrollTimer setTimeout handleScroll 500 set new timer function handleScroll scrollTimer null var headerBottom 165 var fcHeight #pnlMainNavContainer .height var ScrollTop window .scrollTop if ScrollTop headerBottom #HeaderContentBuffer .attr style..