if they are all highlighted with the same color, surely you can't tell if they both have the bg applied?

[EMAIL PROTECTED] wrote:
Hi,

I'm trying to highlights elements of the page on mouseover. I want to
highlight all td's h1's and p's when the mouse is over.

$("td, h1, p").mouseover(function() {
    $(this).css("backgroundColor", "CCCCCC");
  });

  $("p, h1, td").mouseout(function() {
    $(this).css("backgroundColor", mObj.prevBGColor);
  });

That doesn't do what I want. Indeed if a <p>  is inside a <td>, only
the td gets highlighted (or maybe the p too, but then since the td is
also hightlighted, it doesn't look right)

How can I specify that only top element should be highlighted ?

Thanks

Reply via email to