In the original discussion about validation, I had suggested using "label for=" as a way to associate validation with form elements, while making the notation semantically separate from the form element. It would be great to do that for other elements, but I'm pretty sure that the HTML spec calls for label to be used only for form elements, and not non-form elements.
There are good arguments both for and against binding element "settings" with the element. - Brian > -------- Original-Nachricht -------- > Datum: Thu, 2 Nov 2006 02:08:26 -0500 > Von: "John Resig" <[EMAIL PROTECTED]> > An: "jQuery Discussion." <discuss@jquery.com> > Betreff: Re: [jQuery] jQuery Metadata Plugin > >> > From John's example, the following classes could be applied: >> > someclass, {some: (illegal), 'data'} (illegal), anotherclass >> >> Yeah, the whole embedding-data-in-classes idea is just messy to begin >> with. Another option that I plan on working in is so that you could >> add classes in the format: >> option:value >> giving you a result like: >> defaultColumn:3 >> >> Let me know how this sounds. If anyone has any sample pieces of code >> >from plugins that've already done something similar, let me know. > > Well, I used this inside a class for validation rules: > $v(required,min:3) > > No spaces, therefore no way that to apply any styles by that thing. But > just using class="someclass {some:'data'} someotherclass" should by fine, > too. Just avoid spaces inside your meta data. > > The strength of placing meta data in elements rather then their own script > elements is the direct assosiaction of data to elements. > > I'll try to modify my validation stuff to use your meta-data plugin. My > current idea is that I let the user choose via the meta-data plugin in > which way he wants to specify the validation rules. > > -- > Jörn Zaefferer > > http://bassistance.de > -- > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/