It is always (if not then atleast almost always) possible to do thing
like you describe without using custom attributes, BUT don't you think
that arnauds example makes more sense, codewise?

That way you can set the attribs easily
($(something).attr("selectableday, "1")) and then get all the
selectable days with $([EMAIL PROTECTED]).

I've just seen to many examples of javascript "tools" that use custom
strings in every availible attribute there is, for this to make any
sense anymore.

Is there any downside for using this?

On 1/25/07, Olaf Bosch <[EMAIL PROTECTED]> wrote:
> arnaud sellenet schrieb:
>
> > Do you think of a better way, without using a custom attribute (I'm
> > not 100% sure but seems like you can't use numeric classes nor id
> > right ?)
>
> Yes you have a way. Append a second class, so:
>
> <div class="calendarmonth"><h3>January</h3>
>         <div  class="calendarday">1</div>
>         <div  class="calendarday">2</div>
>         ....
>         <div  class="calendarday">23</div>
>         <div  class="calendarday selectableday1">24</div>
>         <div  class="calendarday selectableday2">25</div>
>         .....
>         <div  class="calendarday selectableday41">15</div>
> </div>
>
> Then strip the string "selectableday" from the class in the script and
> you have the numbers from custom attribute to do what you will.
>
> --
> Viele Grüße, Olaf
>
> -------------------------------
> [EMAIL PROTECTED]
> http://olaf-bosch.de
> www.akitafreund.de
> -------------------------------
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
——————————————
     Med Vänliga Hälsningar
 Kristinn "Kiddi" Sigmundsson
           0707-971938
——————————————

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to