views:

24

answers:

1

I have a page that contains an element (a TextBox) that has two CSS classes assigned on page load, but once the page has rendered and the JavaScript has run, the class attribute of the input element is empty.

I know the element originally had the classes defined because good old IE6 shows me the original source when I choose to view source. Yet inspection of the element shows that the class is empty.

Is there a way (in any browser) to add a watch to create a debugging break point on change of an element's attributes?

+2  A: 

The version of Firebug I'm on (1.6X.0b1 on Firefox 4.0 nightlies) has an option 'Break on attribute change' if you right click on an element in the HTML Inspector tab. Not sure if this existed in older versions of Firebug, but it seems to be what you're after.

--Edit Looks like it is available in earlier versions

robertc
Excellent - I had not noticed this, and I've just nailed that bug.
Bernhard Hofmann