Code

Discussion on Universal Loader

Discussion on Universal Loader

Cart 10 sales

colinmathews does not currently provide support for this item.

3 comments found.

Hello friend. thanks for sharing this plugin.
I have a ajax snippet to to load page content into adiv and was wondering how to use your code

var refreshInfo = function() { $.ajax({ url: “timestamp.php”, cache: false, success: function(html) { $(’#calc-card-footer’).html(html); setTimeout(function() { refreshInfo(); }, interval); } }); }; refreshInfo();

how do I use you plugin with this and call the loader inside the div?

thanks

Hi there—unfortunately I can’t provide support as per the listing. Not sure I understand what you’re trying to do, but very briefly I could suggest something along these lines:

var refreshInfo = function (done) { $.ajax({ url: “timestamp.php”, cache: false, success: function (html) { $(”#calc-card-footer”).html(html); done(); setTimeout(function () { refreshInfo(); }, interval); }, }); }; $().universalLoader({ loadedTrigger: (done) => { refreshInfo(done); }, });

I’m a rank beginner with JavaScript. Do you have a “Complete Idiot’s Guide to Universal Loader”? I really want to understand all of the code and see it in a simple example – like clicking a submit button on a form, waiting for the ajax call to return and update the form and then stopping the loader.

Hi! In your purchase there should be a file called instructions.pdf. That has a lot of documentation and examples of use cases. For your specific use case you would do something like this:

$().universalLoader({ loadedTrigger: done => { // Do some work then call done done(); }, });

Congratulations! Nice Work, GLWS :)

Hey – thanks!!

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey