views:

26

answers:

1

I have a button tag with two spans inside;

<button><span><span id="buttonText">Save</span></span></button>

I'm trying to make it so that when you click the button the text changes so I have;

onclick="document.getElementById('buttonText').innerHTML = 'Saving...'; this.style.className"

Now funnily enough it works fine in IE8, but testing in Firefox and Chrome, both lose the css sliding doors styles I have set up on the button and the spans.

A: 

How about manipulating nodeValue instead? .firstChild.nodeValue if memory serves me right.

meder