A horrible solution, but in case someone is wondering:
var count = 0;
var cal = $('.jquery-calendar-'+count);
while (cal.length) {
cal.doSomething();
cal = $('.jquery-calendar-'+(++count))
}
or $('[class*=jquery-calendar-]').each(function(i){
//but this way you won't be sure the index equals the class
number
});
- ricardo
On Dec 3, 11:39 pm, light-blue <[EMAIL PROTECTED]> wrote:
> This is a beginner question. Does anyone know how to target
>
> $('.jquery-calendar-0')
> $('.jquery-calendar-1')
> $('.jquery-calendar-2')
> $('.jquery-calendar-3')
> etc...
>
> I need to run the following, where X is the number, but I don't know
> how many X exist until after the page renders.
> $('.jquery-calendar-X').calendar( {stuff} )
>
> I can't find the solution in Learning Jquery (Chaffer and Swedberg),
> at least not in Chapter 2 How to Get Anything You Want. ;-)
>
> Thanks!