Comments (5)
Hi @Growiel ! You're right. Right now the first call with any parameter whatsoever will initiate the plugin. So first calls like .loading('whatever')
, .loading(5)
or .loading(['test', 3, {}])
will all initiate the plugin, completely ignoring the arguments.
What could be done would be throwing an error like "Loading plugin object not initialized on this element" in case any parameter but a config object or start
is given as argument. What do you think?
from jquery-loading.
Hi,
I still believe that nothing happening is the best behavior. When I call "stop", I expect it to stop. If there's nothing to stop because it wasn't started, then nothing happens.
A toggable error (debug: true ?) for the dev stage would be a sweet addition but I think throwing an error all the time is too harsh, sometimes due to timing (AJAX) purposes, my 'stop' will be called and my 'start' never will. I don't want my app to crash in those cases.
from jquery-loading.
Hi @Growiel. I just did an implementation about what we talked at a separate branch. I'm basically starting the plugin just if the calls are:
$(...).loading('start');
$(...).loading('toggle');
$(...).loading();
$(...).loading({ ... })
Everything else will be ignored and won't start the plugin. I also did some unit tests.
Can you take a look at 9c68d36 before I merge it to master?
from jquery-loading.
Hi, sorry for the long delay.
I tested it and it seems to be doing what we would expect.
Thanks for the quick fix!
from jquery-loading.
Thanks for the help!
from jquery-loading.
Related Issues (19)
- Overlay doesn't hide and a second overlay appears over first one HOT 4
- How to destroy plugin instance? HOT 5
- $(...).loading is not a function HOT 7
- there is no destroy method HOT 3
- Does it possible to add a update message function? HOT 3
- Multiple loading with custom overlay HOT 1
- Submit button inside form tag doesnโt work in Safari HOT 2
- critical dependency error on laravel mix HOT 1
- Bad position HOT 4
- Issue using in a Bootstrap modal dialog HOT 3
- Error: Cannot find module '[object Window]' HOT 1
- the file of jquery.loading.min.js contains 'const' symbol
- can't mask all body when work with jeasyui
- Unable to use multiple instances on same element
- If you use multiple loadings, message does not change HOT 4
- z-index 9 is too low HOT 5
- Unable to get the overlay to display HOT 2
- Nuget package deployment HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-loading.