Is there a way to add a mouseover/mouseout css class change to ALL buttons on a page through, for example, some JavaScript in the page header, without having to give each individual button its own onmouseover and onmouseout events? It seems very inefficient that I would have to add this to every single button on all of my pages:
onmouseover="javascript:this.className='ui-state-hover';" onmouseout="javascript:this.className='ui-state-default';"
There must be an easier way to do this!
Give your elements a class and then you go about something like this:
Just apply the class
myclassto your input boxes.With jQuery: