Metadata
- 授权协议: 未知
- 开发语言:
- 操作系统: 未知
- 软件首页: http://plugins.jquery.com/project/metadata
软件介绍
This plugin is capable of 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.
After that you can simply do:
var data = $('li.someclass').metadata();
if ( data.some && data.some == 'data' )
alert('It Worked!');There's also a bunch of options (like the ability to ignore braces {}).
For full documentation see http://docs.jquery.com/Plugins/Metadata.
JavaScript设计模式
Ross Harmes、Dustin Diaz / 谢廷晟 / 人民邮电出版社 / 2008 / 45.00元
本书共有两部分。第一部分给出了实现具体设计模式所需要的面向对象特性的基础知识,主要包括接口、封装和信息隐藏、继承、单体模式等内容。第二部分则专注于各种具体的设计模式及其在JavaScript语言中的应用,主要介绍了工厂模式、桥接模式、组合模式、门面模式等几种常见的模式。为了让每一章中的示例都尽可能地贴近实际应用,书中同时列举了一些JavaScript 程序员最常见的任务,然后运用设计模式使其解决方......一起来看看 《JavaScript设计模式》 这本书的介绍吧!
