jQueryBatch插件下载 实例有错误jQuery Batch 插件下载,这个插件是从jQuery官方下载的,不怎么常用,不过还是奉献给大家。 jQuery的方法在大多数情况下,操作零个或多个匹配的元素。getter的方法是个例外。在getter方法只返回第一个匹配元素的结果。这是典型的绝大多数用例。但是,有时您可能希望能为在jQuery的集合中的所有匹配元素的结果。介绍jQuery.batch,一个小jQuery的扩展,增加了这样的功能。 jQuery.batch扩展了getter方法的复数形式的核心。这样的Attr方法现在有一个名为attrs兄弟姐妹。这些新的方法操作总体上jQuery的收集,返回一个结果数组。以下是该jQuery.batch提供多元化的方法。 In addition with the core methods the jQuery.batch plugin offers its own plugin method: jQuery.fn.batch. This method takes the name of an existing plugin/method attached to jQuery.fn along with any additional arguments to pass along. $('a').batch('attr', 'href'); Of course since jQuery.batch already provides the attrs method that could also be written as. $('a').attrs('href');
展开内容