We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I use this plugin to lazyload images and scripts, and it works well. But for some reason, it doesn't when I create a custom ajax loader.
This is my code:
$(function() { $('img.lazy').lazy({ effect: "fadeIn", effectTime: 1000 }); // works $('span.status').lazy({ // this does not works threshold: 0, checkstatus: function(el, response) { $.ajax({ url: '/ajax/check', method: 'POST', dataType: 'json', data: { id: $(el).data('id') }, success: function(data) { if(data.valid== true) el.append(data.label).addClass('valid').hide().fadeIn('fast'); response(true); }, error: function() { console.log("oops."); response(false); } }); } }); });
And here is the html:
<a href="/link"> <span class="status" data-id="17" data-loader="checkstatus"></span> <img class="lazy" src="/img_load.png" data-src="/img/img.jpg" > </a>
Any idea what's going wrong? Thanks.
The text was updated successfully, but these errors were encountered:
Hi. What exactly is the problem? Are there any errors? What have you debugged so far? Some more details would be good.
Sorry, something went wrong.
No branches or pull requests
Hi,
I use this plugin to lazyload images and scripts, and it works well.
But for some reason, it doesn't when I create a custom ajax loader.
This is my code:
And here is the html:
Any idea what's going wrong? Thanks.
The text was updated successfully, but these errors were encountered: