Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.easyPlug({
- construct: function (Plugin, element, settings, options) {
- console.log('construct for ', element);
- this.methods.foo = function () {
- element.on('foo', function () {
- element.data('foo','bar');
- });
- };
- }
- });
- $.easyPlug({
- construct: function () {
- console.log('construct for ', this.element);
- },
- methods: {
- foo: function () {
- var p = this;
- this.element.on('foo', function () {
- p.element.data('foo','bar');
- });
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment