In my current project, I am dealing with a limited space for a button. After successfully designing the button to fit perfectly within this constraint and adding the necessary classes class="btn btn-default"
(borrowed from Twitter's Bootstrap), I decided to enhance its functionality by incorporating an onclick dialog event using jQuery-ui (check it out here: http://jqueryui.com/dialog/#modal-form). However, to my dismay, the addition of this dialog event caused the button to inexplicably increase in size, causing a disruption in the layout.
Upon inspecting the button with firebug, I noticed that jQuery-ui had injected several unwanted classes into my button without seeking permission, resulting in a bloated markup similar to this:
class="btn btn-default ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
Now I find myself in a dilemma - how can I maintain the jQuery-ui dialog onclick event on my button without it appending all these unnecessary CSS classes?