Skip to content
New issue

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

Loading and executing LazyLoad for AJAX #412

Open
Hydra9268 opened this issue Mar 12, 2018 · 0 comments
Open

Loading and executing LazyLoad for AJAX #412

Hydra9268 opened this issue Mar 12, 2018 · 0 comments

Comments

@Hydra9268
Copy link

Not sure if anyone has had difficulty trying to make LazyLoad work for AJAX calls, but I found one technique that works. Wanted to share it.

window.jQuery.ajax({
    type: "GET",
    data: "",
    async: "true",
    contentType: "application/ json; charset=utf - 8",
    url: full,
    dataType: "jsonp",
    success: function (json) {
        $.getScript( "/scripts/jquery.lazyload.min.js" ).done(function() {
            lazyload();
        });
        // additional scripts and code here
    }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant