Coder Social home page Coder Social logo

Comments (8)

veapon avatar veapon commented on June 15, 2024 1

How about just simply do $('#btn').removeAttr('disabled') ?

from ladda-bootstrap.

farnott avatar farnott commented on June 15, 2024

I've just hit a snag which is related to this - I'm using HTML5 built-in validation on my forms and if validation fails, the submit button stays animated and can't be re-clicked once the validation issue has been resolved. Just can't think of a solution - can anyone else? It's such a great shame as I love the animated buttons!

from ladda-bootstrap.

thaljef avatar thaljef commented on June 15, 2024

the submit button stays animated and can't be re-clicked once the validation issue has been resolved

I've seen that before too. I seem to recall fixing it by hooking the animation to the OnSubmit event of the form rather than the OnClick event on the button. But in the end, I decided not to use ladda so I don't remember the specifics.

from ladda-bootstrap.

farnott avatar farnott commented on June 15, 2024

Well I came up with a solution, not sure it's the best but it works. Have posted it on my blog:

http://www.flemmingarnott.co.uk/blog/html5-form-validation-ladda-buttons-bootstrap-3/

from ladda-bootstrap.

msurguy avatar msurguy commented on June 15, 2024

@thaljef that would be the better way - to attach the event on form submittal instead of on click.

@farnott thanks for posting a solution to that too, nice way to check validation status of the form.

I will update the docs to reflect the best practice of attaching to the submit event.

from ladda-bootstrap.

WilliamsDad avatar WilliamsDad commented on June 15, 2024

Hello - I too have started using the ladda-button, but without embedding in a form. Is there a way to overcome the problem with the button being disabled when navigating back to the page.

Thanks for your help.

from ladda-bootstrap.

tokar avatar tokar commented on June 15, 2024

@WilliamsDad I found a workarround, just call Ladda.stopAll(); after all calls to Ladda.bind();

from ladda-bootstrap.

WilliamsDad avatar WilliamsDad commented on June 15, 2024

Thanks @tokar - I've just come back to this (sorry for the delay); your simple, but very affective, workaround is just what I needed. Cheers.

from ladda-bootstrap.

Related Issues (20)

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.