Jquery.lazyload.js lazy load picture encountered tab bar switch, you need to scroll manually before you can load it.

when using jquery.lazyload.js to lazily load pictures, when you encounter a tab bar switch, you have to manually scroll the page to load the picture. How to load the picture in the visual area by default when you click the tab bar switch?
found some information and tried it according to some statements on the Internet:

    $("img").lazyload({
        skip_invisible: false
    });

the method is not valid.
tried to trigger through events,

    var timer = setTimeout(function(){
        $("img").lazyload({
            event: "sporty"
        })
    },3000);

this method is not successful either, and it doesn"t seem to be good.
have you ever encountered this kind of problem? is there a good solution?

Mar.12,2021

Call
$('img'). Lazyload ({

) again when

tab is switched.

   
});

has the landlord solved it?


set event to sporty

$("img.lazy").lazyload({effect: "fadeIn",event: "sporty"});

then sporty is triggered when the Tabs tag is clicked

$("img.lazy").trigger("sporty");

that's how I solved it.


when the mouse switches tab, use the trigger () method of JQuery to add scroll events to the pictures under the current tab.

$(selector).trigger("scroll");
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9e81e-69151.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9e81e-69151.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?