GithubHelp home page GithubHelp logo

Comments (7)

CarlosBonetti avatar CarlosBonetti commented on June 26, 2024

Hi @phambinh217.

Please make sure you're including the dist/jquery.loading.js file in your page.

from jquery-loading.

Xeobass avatar Xeobass commented on June 26, 2024

Hi !
I've tryed to use your lib too and i have the same error.

<div id="test" style="width:200px; height:200px;">
testing...
</div>

$("#test").loading();

i use jquery v 1.12.4

i've loaded the jquery.loading.js and jquery.loading.min.js from the dist folder.

=)

from jquery-loading.

CarlosBonetti avatar CarlosBonetti commented on June 26, 2024

Hi @Xeobass !

Please load just one of the dist/jquery.loading.js OR dist/jquery.loading.min.js, but not both. The min file is identical to the other one, but minified for production.

Also, load the css file if you're not already doing so.

Another thing to consider is the order you're importing and calling the plugin: you need to first import the plugin and just then call the $().loading function. If you're calling the plugin before import you'll get a Uncaught TypeError: $(...).loading is not a function error.

from jquery-loading.

qiulin avatar qiulin commented on June 26, 2024

I had same problem. A overlay was attached to ajax request. It works well when request start, but could not stop when ajax request stopped, and caught the error message.

codes likes

$.Loading.setDefaults({
    zIndex: 9999
})

// ajax加载动画
$(document).ajaxSend(function () {
    $('body').loading({overlay: $('#loading-overlay')})
})

$(document).ajaxStop(function () {

    $('body').loading('stop');
})

from jquery-loading.

CarlosBonetti avatar CarlosBonetti commented on June 26, 2024

Hi @qiulin ! Could not reproduce here... please share the full code with your html script imports. You could use something like codepen.io for that

from jquery-loading.

ziedmahdi avatar ziedmahdi commented on June 26, 2024

when plugin is imported using npm (Meteorjs application), I get the same error.

from jquery-loading.

CarlosBonetti avatar CarlosBonetti commented on June 26, 2024

It was a bad definition of the UMD exporter. Should be fixed at v1.3.0.

from jquery-loading.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.