-
Notifications
You must be signed in to change notification settings - Fork 865
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
Add wrapper for jQuery. #33
Conversation
👍 for the angularjs version :) |
I'm... confused. Last night there were instructions for JQuery, tonight there are not. Yet Github says the Readme file has not been modified since last July. Also, in the Dist folder (last night) there was a file called ladda.jquery.js - which I downloaded and am in the process of using - and tonight it's not there. Again, Github records no changes in the past 24 hours, so I don't know what's going on. It's as though I imagined the whole thing - except I have the files (and working JQuery with Ladda) to prove it. I know it's late, but I still can't figure out what's happened. EDIT: uhm, OK, I see these additions in the two commits noted in this thread, but they're not appearing in the main release as they were yesterday. |
@sbwMikael It sounds like you accidentally went into my fork/branch somehow. Glad that the code worked though! 🎱 |
Ah! Yes, that would explain it. I'm pretty new to Github, and stumbling around a bit, so I probably clicked somewhere I hadn't intended. Yeah, it's great, thank you. The only issue I had with ladda.jquery.js was in the "else" clause towards the bottom of the file, where it begins with a comment: "Binds the target buttons to automatically enter the..." I kept getting warnings from Firebug that "options" wasn't defined (even after I'd created an options object and set values for timeout and callback). I'm new to JS and JQuery too, so still figuring things out. But it seems that which I click my ladda enabled button, the code below there doesn't know about the options object I passed in when I set the bind for ladda on my button (after document.ready). So I added a test - if (typeof options != 'undefined')... and skip the options checking part if it isn't. Also, I've no idea how/if I can dynamically set up a ladda bind on a button created after document.ready at the moment, but I think I might have a need for that. Not sure yet - I've got similar problems with X-Editable, but that's another story :) Being new to JS/JQuery/HTML/CSS/Ladda, it threw me a little at first when I tried to change my ladda-enabled button text after the button had been clicked (in the success: callback for an AJAX call), which made the little spinner disappear from the button. Eventually I worked out that I needed to change the SPAN text below the button instead - oops. |
Hmmm now I'm confused. There's no such comment in |
Hmm, I see what you mean! Uhh. OK, I need to post my copy somewhere so you can take a look at it because - well - I'm not sure what's going on :) |
Ok yeah that's not this one. That's a reimplementation of Ladda in jQuery by someone else. The URL is at the top of that file. :) |
Ah-huh! Thank you for clearing that up. OK, I'd much rather use your official version so I'll look into swapping over soon. Best regards :) |
Mine's not official, yet! This thread is part of my |
Oh I see :) Apologies. Well, it looks very promising so I hope Hakim will be encouraged to make a decision about adding it as part of the package! |
Sorry about the lengthy delay on this – it's been merged in now and is available in the 0.9.3 release: https://github.com/hakimel/Ladda/releases/tag/0.9.3 |
I love Ladda and that it's not dependent on anything. But it seems popular to wrap Ladda in a jQuery wrapper for those that want to use it. So I made a thin wrapper that can be loaded optionally by including
ladda.jquery.min.js
alongsideladda.min.js
.If this is accepted I'm willing to take the same approach to make an AngularJS version.