Hi Michael

I thought that since 'match' is a ID (<div id=#match>) that means it
is NOT a string, so I do I have the whole wrong idea about IDs? They
are just plain old strings?

Using the debugger is just what I need. I added the line to my code

   $("div").click(function(event) {
   debugger;
  if (event.target.id != 'match')  {
  $("#text800birds").css( { background: "#EEEEEE", color:
"#FFFFFF"} );
  }
 });

When I load the page Firebug opens (not everytime for some reason)
with the script tab showing and the line with debugger; in yellow and
to the right is the watch window.

I can then go into the console and type:

event.target.id and it shows its a null ""

event.target shows <div class="clipframe">

So does that mean that event.target.id doesnt work?

I wish Firebug had some documentation.

Mitch


On Aug 16, 7:57 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> > >     if (event.target.id != 'match')
> > Thank you for the syntax correctoin. But how does jQuery know
> > that 'match' is an ID and not an ordinary variable.
>
> It's neither. 'match' is a string.
>
> event is a variable. event.target is a property of the event variable, and
> event.target.id is a property of event.target.
>
> > I have the handler set up but it seems to match any div that
> > is clicked including the #match ID which I want it to ignore. Grrr.
>
> > So I am wondering is there some kind of process I could
> > follow on Firebug that would help me see where things are going wrong?
>
> I would add this statement where you want to look around (e.g. at the first
> line of your click event function):
>
>    debugger;
>
> Firebug will stop there and you can look at variables and stuff. For
> example, you can type event.target.id into the Watch window and it will show
> you the value of that property.
>
> I wonder if it should be this.id instead of event.target.id? See what is in
> them both...
>
> -Mike

Reply via email to