I have:
<a id = "button" style="display:inline"></a>
<a id = "buttonPressed" style="display:none"></a>
And I’m using
$('#button, #buttonPressed').click(function(event) {
$('#button, #buttonPressed').toggle();
//Do other stuff
})
The “display:inline” button is getting changed to “display:none” as desired, but the “display:none” button is changing to style=”” instead of the desired “display:inline”.
How do I address this?
you can try
toggleClass():Demo