aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjzaefferer <joern.zaefferer@gmail.com>2010-07-30 14:04:11 +0200
committerjzaefferer <joern.zaefferer@gmail.com>2010-07-30 14:04:11 +0200
commitb3940d2f78dfcc37792ceb97e5659b78f156794c (patch)
treeb99a04b26fdbfca3ec51e4856e30a0a60e4fd5fb
parent39f0c1010ac81eafab2e6a0cac8a552049c9e544 (diff)
downloadjquery-ui-b3940d2f78dfcc37792ceb97e5659b78f156794c.tar.gz
jquery-ui-b3940d2f78dfcc37792ceb97e5659b78f156794c.zip
Replace element.data(...) with $.data(element, ...). Fixes #5756 - Widget: Use $.data instead of .data for performance reasons
-rw-r--r--ui/jquery.ui.widget.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index 265489866..e21287ae0 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -129,7 +129,8 @@ $.Widget.prototype = {
_createWidget: function( options, element ) {
// $.widget.bridge stores the plugin instance, but we do it anyway
// so that it's stored even before the _create function runs
- this.element = $( element ).data( this.widgetName, this );
+ $.data( element, this.widgetName, this );
+ this.element = $( element );
this.options = $.extend( true, {},
this.options,
$.metadata && $.metadata.get( element )[ this.widgetName ],