I'm not sure (could be wrong) but I don't think you can use .each in that
way -- passing an array to jQuery.
I think you need to do this:
$.each( dates, function(i) {
// etc.
-- Josh
----- Original Message -----
From: "Jimbo M" <[EMAIL PROTECTED]>
To: "jQuery UI" <[email protected]>
Sent: Tuesday, October 14, 2008 9:37 AM
Subject: [jquery-ui] Highlighting of special days in datepicker
>
> I've been playing with this all morning and nothing so far...can
> anyone help a newbie? Hopefully I'll be up to speed soon and pulling
> my own weight here. But in the meanwhile:
>
> I'm trying to populate the datepicker in inline mode so that certain
> days are highlighted. I've boiled it down to a syntax that I feel
> should work, but it doesn't and I'm stumped. Using filters such
> as :even work, so why not this?
>
> $("#calendar").datepicker();
> var dates = [1, 5, 12, 21, 27, 30];
> $(dates).each(function(i, d) {
> $("#calendar .ui-datepicker-days-cell a[text='" + d +
> "']").addClass("myClass");
> });
>
> css:
> .myClass {
> background-color: #88FF88;
> }
>
> Can anyone spot what I'm missing here? Thanks...
>
> --- Jim ---
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---