[jQuery] Re: adding a class to an object if the next object has the same attribute value.

2009-01-08 Thread peet
is refering to the 'window' object or some other context, not > the element you just selected. > > $('.row > div').each(function(){ //inside each 'this' is the current > element >    var $this = $(this), next = $this.next(); >    if (next.attr('t

[jQuery] Re: having a child div inherit a parent width

2009-01-07 Thread peet
isn't that not the same as setting "width:100%" to all childs? On Jan 7, 2:42 am, roxstyle wrote: > I have a table where each td has its width declared in css rules. > Inside some "td" i have either "p" or "div" > I want to have these elements inherit the width of the parent td. > I have a sam

[jQuery] adding a class to an object if the next object has the same attribute value.

2009-01-07 Thread peet
Hello to you all, I have looked in this group and could not find anyone trying the same thing as i am trying to accomplish. I am trying to add a class to an object if the next object has the same attribute. I don't know the name of the attributes value the 2 have in common. the code i have is: