Thanks for the info on the metadata plugin.
"Make sure to avoid any spaces..." is exactly the kind of "gotcha" that
makes using classes as a data repository so troublesome. While it is
technically possible, mixing data types inside an attribute just feels like
a bad practice to me.
Jörn Zaefferer wrote:
>
> Daemach schrieb:
>> Actually I think I may just modify the validator code to read out of a
>> custom
>> expando. It would be nice to be able to pass the attribute name to the
>> validator engine directly though...
>>
>> Jorn? <==(sorry - I don't know how to do the fancy "o" ;)
>>
> Heh, öööö. Just copy&paste the next time you need it ;)
>
> Actually the custom attribute is already supported: Just tell the
> metadata plugin to do so, and the validator uses it.
>
> Put this in front of any other code that uses the metadata (eg.
> validation):
> $.meta.setType("attr", "validate")
> And replace "validate" with anything you like as a custom attribute.
>
> In case you need to use the classes, make sure to avoid any spaces, eg.
> class="{require:true,email:true}" can't be confused by any browser with
> any actual style class, because the curly braces are illegal characters
> for style classes.
>
> --
> Jörn Zaefferer
>
> http://bassistance.de
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
--
View this message in context:
http://www.nabble.com/Of-extendos%2C-metadata-and-valid-XHMTL---Is-it-ok-to-add-attributes-to-elements--tf3337204.html#a9303474
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/