aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.selectable.js
diff options
context:
space:
mode:
authorEduardo Lundgren <eduardolundgren@gmail.com>2009-01-16 00:33:46 +0000
committerEduardo Lundgren <eduardolundgren@gmail.com>2009-01-16 00:33:46 +0000
commit78c4d87d7b2f9f8ece53f062eb44cabf9dd51bf3 (patch)
tree5d7e87e5d970d9abf0bf429943a56f3295374b59 /ui/ui.selectable.js
parent358be8bd46ca81f16f4ca8215d35118c22b1d86d (diff)
downloadjquery-ui-78c4d87d7b2f9f8ece53f062eb44cabf9dd51bf3.tar.gz
jquery-ui-78c4d87d7b2f9f8ece53f062eb44cabf9dd51bf3.zip
Fix for #3838 - Components should use this.widgetName on internally
Diffstat (limited to 'ui/ui.selectable.js')
-rw-r--r--ui/ui.selectable.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/ui/ui.selectable.js b/ui/ui.selectable.js
index d8f86a406..17728d298 100644
--- a/ui/ui.selectable.js
+++ b/ui/ui.selectable.js
@@ -12,9 +12,16 @@
*/
(function($) {
+var widgetName = "selectable";
+var classWidgetName = ".selectable";
+
$.widget("ui.selectable", $.extend({}, $.ui.mouse, {
_init: function() {
+ // update widgetName with the name given by the widget factory
+ widgetName = this.widgetName;
+ classWidgetName = '.' + widgetName;
+
var self = this;
this.element.addClass("ui-selectable");
@@ -56,8 +63,8 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, {
destroy: function() {
this.element
.removeClass("ui-selectable ui-selectable-disabled")
- .removeData("selectable")
- .unbind(".selectable");
+ .removeData(widgetName)
+ .unbind(classWidgetName);
this._mouseDestroy();
},