• This repository has been archived on 16/Jan/2020
  • Stars
    star
    218
  • Rank 181,805 (Top 4 %)
  • Language
    JavaScript
  • Created over 15 years ago
  • Updated about 14 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A jQuery plugin for extracting metadata from DOM elements.
jQuery Metadata Plugin

By John Resig

This plugin is capable of silently, and automatically, extracting metadata 
from classes, random attributes, and child elements.

For example, you can do:
<li class="someclass {some: 'data'} anotherclass">...</li>
OR
<li data="{some:'random', json: 'data'}">...</li>
OR
<li><script type="data">{some:"json",data:true}</script> ...</li>

The default is the first method, but you can always change it by twiddling 
the options. This means that there is at least one option here that can 
appease you.

There's also a bunch of options (like loading data into a single property 
and the ability to ignore braces {}).