jquery - Lazy loading with wordpress not working in contents added via ajax -


i making pagination working infinite scroll. lazy loading not working in these contents. using following ajax function

        $.ajax({             url: nexturl,             type: 'get',             success: function(html){                 newdata = $(html).find('div#ajax_pagination');                 $("#ajax_pagination").append(newdata);                  $(html).find('img[data-lazy-src]').each( function() {                     lazy_load_image( );                 });             },         }); 

it showing error

uncaught referenceerror: lazy_load_image not defined  

any ideas?

the function defined inside function in "lazy_load" file, private scope. other functions outside scope cannot call it.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -