1

I have a large website in development with a large amount of JS in different files. I have come across an issue where something is removing a class from the DOM. I can see it when I view source but not in Firebug.

Normally I would place some alerts/console.log calls with the hasClass value but because I have no idea where to start I wanted to know if I can trace the change back when it occurs somehow?

Denis

Denis Hoctor
  • 2,597
  • 4
  • 33
  • 51

2 Answers2

1

Firebug lets you set a breakpoint and single-step through your code. This should make it clear where the issue is happening.

Tim Howland
  • 7,919
  • 4
  • 28
  • 46
0

that specific class name must be in use in that hidden function that remove it, right? so either grep for it on posix-based system, or, if you are using Win system, use your IDE "search-in-files" function to trace that modification.

Tzury Bar Yochay
  • 8,798
  • 5
  • 49
  • 73
  • a friend of mine (http://intellectronica.net/) just sent me a comment on this one (at friendfeed) here is what he says: in YUI3, every attribute of every object has a corresponding change event, so you can just create a handler for the change event of the class attribute, put a breakpoint there and examine the stack trace. It's such a brilliant idea, they should adopt it as a standard for the DOM. – Tzury Bar Yochay Oct 05 '09 at 20:05