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
Post a Comment