Thanks Blair. So your suggestion of using $("[EMAIL PROTECTED]'enabled']").click() is the selection syntax? Hmm... I'm gonna look that up. Thanks! :o)
Chris

Blair McKenzie wrote:
They are more or less equivalent, but using the jQuery select syntax is standard and probably easier to read.

Blair

On 11/7/06, Christopher Jordan <[EMAIL PROTECTED]> wrote:
Thanks Klaus!

How does this syntax differ from other suggested syntax:
$("[EMAIL PROTECTED]'enabled']").click()

I'm curiout which is preferred, or faster. They both look clean enough to me.

Chris
    


Klaus Hartl wrote:
Christopher Jordan schrieb:
  
Hi folks,

I have a table that represents a calendar. The user will be able to 
select multiple dates from the calendar, but cannot select dates in the 
past. I've written this code before using all _javascript_ and what I did 

was add several additional pieces of data to the td tag other than ID or 
CLASS. I added "state", "index", "status" and a few others. I accessed 
these through f.calendarid.state... that kind of thing.


So I'm wanting to apply an event (probably several: click, mouseover, 
mouseout) to only those td tags that have their state  set to "enabled". 
Not to *all* tds and not even to all tds with a certain class. ID alone 

won't work. Is there a way to do this using jQuery? Something like: 
$("td" status).click()... or whatever.

Thanks,
Chris
    
Hi Christopher, this could work:

$('td').each(function() {
     if (this.status == 'enabled')
         $(this).click(function() {
             // do something
         });
});




-- Klaus

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



  

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




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

No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.430 / Virus Database: 268.13.28/518 - Release Date: 11/4/2006 5:30 PM
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to