当前位置: 代码迷 >> Ajax >> AJAX 学习札记-patter
  详细解决方案

AJAX 学习札记-patter

热度:346   发布时间:2012-11-22 00:16:41.0
AJAX 学习笔记--patter
1.) DoSomethingLocal is defined as $.fn.DoSomethingLocal. You can add as many custom functions to the jQuery.fn (or simply $.fn) object as required by your plugin implementation. Any function you add to the $.fn object is assumed to work on references to an instance of an element/object that was selected. This is what the $.fn syntax means - we are simply adding a custom interface to a jQuery object that assumes selected elements. 2.) DoSomethingGlobal is applied directly to the global jQuery object as $.DoSomethingGlobal. A function attached to the jQuery framework in such way assumes that it will not work on selected elements but rather it will work in the global scope and contain practically any implementation.
  相关解决方案