I have been looking at the Form Validation plugin created by Jörn Zaefferer (which is excellent btw) and the way he used a special class syntax to indicate validation rules for various form elements.  He use some specific stuff like class="$v(required,max:15)" to indicate that the field is required and has to contain 15 or fewer characters.  This is pretty cool, and according to all I've heard so far, the most semantically correct and unobtrusive.

So... how about something like this:

<dl class="accordion $o(accordion:false,hideSpeed:'slow')">
    <dt>click me</dt>
    <dd>to show me</dd>
</dl>

My only concern is whether the single quote is considered bad form in the class attrib for some reason.  If so, I can just write a parser and use my own syntax looking for stuff that's not boolean or numbers. But if not then the plugin can be kept a little smaller by just being able to use eval.

Thanks again for all of the help!

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

Reply via email to