jQuery plugin for HTML Microdata
Extract and manipulate objects stored in HTML Microdata.
$(node).items(itemtype)
$('#albumlist').items('http://schema.org/MusicAlbum')
item.property(property) => a set of jQuery nodes
$(node).property('name') => [ node ]
$(node).property('byArtist').eq(0).property('album') => [ node, node ]
property.value() => the itemValue of the node(s)
$(node).property('name').value() => string
$(node).property('byArtist').eq(0).property('name').value() => string
property.values() => array of the itemValues of the nodes
$(node).property('name').values() => [ string, string ]
item.property(property).value(value)
$(node).property('name').value('Yellow Submarine')
item.property(property).eq(index).value(value)
$(node).property('name').eq(1).value('Yellow Submarine')
The plugin also provides a convenience method for working with items (“things”) where there is only a single instance of each property. This is analogous to jQuery’s data
method.
item.microdata(key)
$(node).microdata('name');
item.microdata(key, value)
$(node).microdata('name', 'The Beatles');
item.microdata({ key: value })
$(node).microdata({
name: 'The Beatles',
url: 'https://en.wikipedia.org/wiki/The_Beatles'
});
collection.microdata()
$(node).microdata()
$('#albumlist').items('http://schema.org/MusicAlbum').microdata()