Step 1The first step is to extend the actual jQuery object with the function that we wish to add. In our case, we wish to add "truncati ...
Step 1
The first step is to extend the actual jQuery object with the function that we wish to add. In our case, we wish to add "truncation" functionality. So here's where to start: create ajquery.truncate.js file and save it with the following code:
1 $.fn.truncate = function(options) { 2 return this.each(function() { 3 });4 };
原标题:Building Your First jQuery Plugin
关键词:jquery
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。