Hi Christopher,

I think you can get away with using an attribute selector on the td:

$('[EMAIL PROTECTED]').each(function() {
  //do whatever it is you're going to do...
});


--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Jan 2, 2007, at 3:30 PM, Christopher Jordan wrote:

Hi folks,

I've got a page with a table and various tds that look something like this:

<td
    id            = "SomeUniqueID"
    class         = "someClass"
    originalColor = "someColor"
    state         = "Enabled"
    status        = "off"
    preferred     = "Yes"
    dateValue     = "someDateValue"
></td>

In some cases the status is set to "on" and in others it's left as "off". I'd like to be able to get the dateValue that is associated with each td that has a status of "on".

Is there a better way to do that than this:

$("td).attr("status").each(function(){
    if(this.status == "on"){
       //do whatever it is i'm going to do...
    }
});

I'm thinkin' this might be it, but thought I'd check with the group to see if maybe there was a more super-cool way to accomplish this. :o)

Thanks,
Chris
 --
http://www.cjordan.info
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to