_trigger not working inside Bind - Jquery widget -


i working on jquery widget 1 of counter plugins. started learn plugin coding , i'm stuck @ point have use trigger call event in _create access public function 'tickup'. when tried following code not working , binding click event buttons having attributes data-step. , once click buttons , should fire function 'tickup' int widget.

_create: function() {     var self = this;     var tickobj = self.element.find('[data-step*="tick-"]');      tickobj.bind("click", function(e) {         self._trigger('tickup', null, {});     }); },  tickup: function() {     alert('tickup'); } 

any suggestions?

_create: function() {     var self = this;     self.bind('tickup' function() {         alert('tickup');     });      var tickobj = self.element.find('[data-step*="tick-"]');      tickobj.bind("click", function(e) {         self._trigger('tickup', null, {});     }); }) 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -