Permalink
Browse files

Add 'destroy' function

1 parent 8cc5214 commit eeaa3015ccf264ec7c209799b194f7d0e1d47340 @odin3 odin3 committed on GitHub Jun 16, 2016
Showing with 4 additions and 0 deletions.
  1. +4 −0 jquery.dropdown.js
View
@@ -382,10 +382,14 @@
} else {
$ul.append($option);
}
+ },
+ destroy: function($e) {
+ $($e).show().removeAttr('data-dropdownjs').next('.dropdownjs').remove();
}
};
$.fn.dropdown = function(params) {
+ if( typeof methods[params] == 'function' ) methods[params](this);
if (methods[params]) {
return methods[params].apply(this, Array.prototype.slice.call(arguments,1));
} else if (typeof params === "object" | !params) {

0 comments on commit eeaa301

Please sign in to comment.