You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/plugins.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -41,13 +41,13 @@ Methods should be extended by [wrapping them](http://coreymaynard.com/blog/exten
41
41
42
42
```js
43
43
varself=this;
44
-
this.someMethod=function() {
44
+
this.someMethod=(function() {
45
45
var original =self.someMethod;
46
46
returnfunction() {
47
47
// do your logic
48
48
returnoriginal.apply(this, arguments);
49
49
};
50
-
});
50
+
})();
51
51
```
52
52
53
53
**Important:** If the method you're overriding returns a value, make sure the
@@ -98,4 +98,4 @@ $('select').selectize({
98
98
});
99
99
```
100
100
101
-
For a more detailed description of plugin option formats and how the plugin system works, check out the [microplugin](https://github.com/brianreavis/microplugin.js) documentation.
101
+
For a more detailed description of plugin option formats and how the plugin system works, check out the [microplugin](https://github.com/brianreavis/microplugin.js) documentation.
0 commit comments