From b3940d2f78dfcc37792ceb97e5659b78f156794c Mon Sep 17 00:00:00 2001 From: jzaefferer Date: Fri, 30 Jul 2010 14:04:11 +0200 Subject: [PATCH] Replace element.data(...) with $.data(element, ...). Fixes #5756 - Widget: Use $.data instead of .data for performance reasons --- ui/jquery.ui.widget.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ], -- 2.39.5