Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed template to use jQuery's extend() rather than modify the jQue…

…ry prototype
  • Loading branch information...
commit 2d90d8cb41cdef93c6a613f6d427a8f0d2db4863 1 parent 422d122
@wyattdanger wyattdanger authored
Showing with 9 additions and 8 deletions.
  1. +9 −8 jquery.plugin.js
View
17 jquery.plugin.js
@@ -21,14 +21,15 @@
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
;(function($){
- $.fn.pluginname = function(options) {
- var settings = $.extend({}, $.fn.pluginname.defaultOptions, options);
+ $.fn.extend({
+ pluginname: function(options) {
+ this.defaultOptions = {'bar':'baz'};
- return this.each(function() {
- var $this = $(this);
- });
- };
+ var settings = $.extend({}, this.defaultOptions, options);
- $.fn.pluginname.defaultOptions = {
- };
+ return this.each(function() {
+ var $this = $(this);
+ });
+ }
+ });
})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.