教程集 www.jiaochengji.com
教程集 >  jQuery  >  jQuery 插件  >  正文 jQuery apply()

jQuery apply()

发布时间:2014-06-26   编辑:jiaochengji.com
Sometimes deep inside a DOM traversing chain you need a reference to plain current jQuery object. My extremely simple plugin allows you in such cases to call apply() method, which accepts a function (anonymous preferrably) and executes it immidiately, pas
Sometimes deep inside a DOM traversing chain you need a reference to plain current jquery object. My extremely simple plugin allows you in such cases to call apply() method, which accepts a function (anonymous preferrably) and executes it immidiately, passing a current jQuery selection (not some DOM Element, but the whole Array-like jQuery object with current selection right inside) as this. Method returns the very same selection, so you may continue your chain just like after any other non-traversing method.

您可能感兴趣的文章:
jQuery apply()
IE PNG Fix
jquery each()源代码
jquery animate图片模向滑动示例代码
Form Tooltip
对于this和$(this)的个人理解
Table row drag and drop
Mac-Style Drop Down Menu
jQuery Touch
JavaScript MVC 学习笔记(三)类的使用(中)

上一篇:jQuery BlockUI Plugin 下一篇:jMyCarousel
[关闭]
~ ~