Scroll bar (local area) event triggered bottoming

$(".con").scroll(function(){
  var h1 = $ (this) .height (), ---------------------- scrollbar visual highly localized region;
        h2 = $ (this) .scrollTop (), ------------------ scroll bar from the top level of the top visible area (scroll height);
        h3 = $ ( "# two") height ();. ------------------ need to scroll the actual height of the module;
    Three relations: h1 + h2 = h3;
    if(h1+h2=h3){
      console.log ( "scroll bar has bottomed out");
    }
 
})

Guess you like

Origin www.cnblogs.com/xzybk/p/12115899.html