John Resig schrieb: > Hi Everyone - > > I just finished reading over the massive thread that discusses > embedding metadata into elements for later extraction. Well, I just > finished a plugin to handle all three metadata-extraction methods. > > You can see a demo here: (Uses Firebug debug statements!) > http://john.jquery.com/plugins/meta/ > > It's capable of extracting metadata from classes, random attributes, > and child elements. > > For example, you can do: > <li data="{some:'random', json: 'data'}">...</li> > OR > <li class="someclass {some: 'data'} anotherclass">...</li> > OR > <li><script type="sometype">{some:"json",data:true}</script> ...</li> > > The default is the first method, but you can always change it but > twiddling the options. This means that there is at least one option > here to appease you. > > There's also a bunch of options (like loading data into a single > property and the ability to ignore braces {}). Let me know what you > think of this - I know that I'll probably be using it very soon. > Looks like I can use this for the form validation plugin and remove my own meta-data parsing.
-- Jörn Zaefferer http://bassistance.de _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
