Sha256: 4317b34b2f06bf23fed62279a110892f6259fd89fc3d13619a0ef131ce3ef590

Contents?: true

Size: 1.26 KB

Versions: 253

Compression:

Stored size: 1.26 KB

Contents

/*
 * Metadata - jQuery plugin for parsing metadata from elements
 *
 * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 *
 * Revision: $Id: jquery.metadata.js 3620 2007-10-10 20:55:38Z pmclanahan $
 *
 */
(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';var data=$.data(elem,settings.single);if(data)return data;data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m)data=m[1];}else if(settings.type=="elem"){if(!elem.getElementsByTagName)return;var e=elem.getElementsByTagName(settings.name);if(e.length)data=$.trim(e[0].innerHTML);}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr)data=attr;}if(data.indexOf('{')<0)data="{"+data+"}";data=eval("("+data+")");$.data(elem,settings.single,data);return data;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);

Version data entries

253 entries across 207 versions & 15 rubygems

Version Path
muck-engine-0.2.24 public/javascripts/jquery/jquery.metadata.min.js
muck-users-0.2.20 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-engine-0.2.23 public/javascripts/jquery/jquery.metadata.min.js
muck-engine-0.2.23 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-oauth-0.1.4 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-oauth-0.1.3 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-oauth-0.1.2 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-engine-0.2.22 public/javascripts/jquery/jquery.metadata.min.js
muck-engine-0.2.22 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-contents-0.2.13 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-contents-0.2.12 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-engine-0.2.21 public/javascripts/jquery/jquery.metadata.min.js
muck-engine-0.2.20 public/javascripts/jquery/jquery.metadata.min.js
muck-oauth-0.1.1 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-oauth-0.1.0 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-engine-0.2.19 public/javascripts/jquery/jquery.metadata.min.js
muck-engine-0.2.18 public/javascripts/jquery/jquery.metadata.min.js
muck-profiles-0.1.18 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-contents-0.2.11 test/rails_root/public/javascripts/jquery/jquery.metadata.min.js
muck-engine-0.2.17 public/javascripts/jquery/jquery.metadata.min.js