Download This Plugin Back To jQueryScript
PowerButtons adds superpowers like confirmations and async loading to standard buttons. Integrates seamlessly with Bootstrap and jQuery.
hint: The "confirm" attribute is set to the message to show; if the user hits "accept", the action of the button will continue (i.e. show an alert).
hint: The "showmessage" attribute is set to the message to show; once closed the message, the action will continue (i.e. show an alert)
Here we have a long running task that needs to be executed upon pressing the button. The asynctask button will execute it and in the meanwhile will show a modal dialog
hint: here we also add a data-showmessage that will execute after the task ends
In this example, we are substituting the button for a form inside a button, so that the form is submitted when the button is clicked
hint: If you click the button, the button will submit a form to this page; in the submitted URL you can check that the name of the button appears as a parameter (the submit method is set to GET)
In this example we are using the library in a component that is not a button, but a linkgo to github
Now we are using the library on a image, to show a message when it is clicked
The button is a common button, that is being converted into a confirm button programmatically
The button is getting multiple actions: first confirmation and then show a dialog
In this example we are introducing a form that we are validating, adding a derived field (hidden) and greeting the user with not even a line of code
In this example we have a task that will run for 5 seconds, but it is possibile to cancel the task
Important: if the task does not finish, the dialog will not be hidden. This is to protect the execution of the task.
The form button can also add some hidden fields, so that they are submitted along with the value of the button
In this example we are changing the default values to set it in different languages, so that each value that is not defined, will get it from the globals