git://git.onelab.eu
/
myslice.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use the ‘pubsub’ class as a means to tag DOM elements that need to receive API events
[myslice.git]
/
manifold
/
static
/
js
/
plugin.js
diff --git
a/manifold/static/js/plugin.js
b/manifold/static/js/plugin.js
index
41d8e8b
..
fb7bf59
100644
(file)
--- a/
manifold/static/js/plugin.js
+++ b/
manifold/static/js/plugin.js
@@
-30,6
+30,9
@@
var Plugin = Class.extend({
// reference and a normal reference
this.element = element;
this.$element = $(element);
// reference and a normal reference
this.element = element;
this.$element = $(element);
+ // programmatically add specific class for publishing events
+ // used in manifold.js for triggering API events
+ if ( ! this.$element.hasClass('pubsub')) this.$element.addClass('pubsub');
// return this so we can chain/use the bridge with less code.
return this;
// return this so we can chain/use the bridge with less code.
return this;