Making $.metadata Extensible
$(function(){
$('.example').css({
'float': 'left',
border: '2px solid #0f0',
padding: '5px',
margin: '5px'
});
$('.examplebutton').click(function(){
var opts = eval(/(\({.*}\))/.exec(this.value)[1]);
alert(JSON.stringify($(this).prev('.example').metadata(opts)));
}).after('');
});
Metadata
I put the idea that the metadata plugin should be extensible
out on the
jquery discussion group, but it got no attention, so I'm documenting it here.