Edit: Title makes more sense now.
I\'m currently writing basic CRUD functionality using a popular web framework. In the edit section of my app, I have a \'Delete\' butto
If you don't want to submit the form when you click the button, don't use a submit button. Add type="button"
.
When your form submits, the page refreshes and you thus need to reapply the js/css changes on document load... or submit using AJAX and change the input type from submit to button / or return false on clicking the submit button.