search

Home  >  Q&A  >  body text

javascript - Lazy Load usage issues

$(function(){
    $("img.lazy").lazyload({
      effect:'fadeIn'
    });
    
});
<img class="lazy" src="images/list/mo.jpg" src="images/list/8.jpg" width="545px" height="320px">

In this way, if you pull down the mouse, the picture will appear. However, when you use Miaodian to locate a certain floor, the picture will not be loaded. Only the default picture will appear, and the picture will not appear.

漂亮男人漂亮男人2737 days ago376

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-05-19 10:15:50

    Then check to see if the scroll event is triggered when jumping to the anchor point. If not, compensate yourself.
    Or you can check the documentation to see if there is any control over anchor jump.
    I have never used this plug-in. I have only written native code. The core is definitely based on the scroll event. If you really can’t solve the problem, just write it yourself. It’s only 20 or 30 lines of code.

    reply
    0
  • Cancelreply