Permalink
Browse files

some util methods and fixes

  • Loading branch information...
1 parent e6474e7 commit 1339892b80de7961d391efefbb7eec48a7b88742 @hofmeister committed Feb 2, 2014
Showing with 1,589 additions and 1,569 deletions.
  1. +8 −0 js/lib/core.js
  2. +4 −0 js/lib/utils.js
  3. +1,577 −1,569 js/lib/widget.js
View
@@ -1076,6 +1076,14 @@ if (!$wbConfig.noCSS) {
this._bindings[evt].push(handler);
return this;
},
+ bindOnce: function(evt, handler) {
+ var me = this;
+ var wrapper = function() {
+ handler.apply(this,arguments);
+ me.unbind(evt, wrapper);
+ };
+ return this.bind(evt,wrapper);
+ },
unbind:function(evt,handler) {
if (!handler) {
delete this._bindings[evt];
View
@@ -967,6 +967,10 @@
});
return out;
};
+
+ $.fn.tag = function() {
+ return this[0].tagName.toLowerCase();
+ };
$.fn.isOnPage = function() {
return ($(this).closest('body').length != 0);
Oops, something went wrong.

0 comments on commit 1339892

Please sign in to comment.