diff --git a/entries/jQuery.widget.xml b/entries/jQuery.widget.xml index 81745871..5f6d677a 100644 --- a/entries/jQuery.widget.xml +++ b/entries/jQuery.widget.xml @@ -84,6 +84,27 @@

All widgets have a create event which is triggered upon instantiation.

+ +

Instance

+ +

The widget's instance is stored using jQuery.data() with the widget's full name as the key. Therefore, you can use the following to retrieve the progressbar widget's instance object from the element.

+ +

+				$( "#elem" ).data( "ui-progressbar" );
+			
+ +

Whether an element has a given widget bound to it can be determined using the :data selector.

+ +

+				$( "#elem" ).is( ":data( 'ui-progressbar' )" ); // true
+				$( "#elem" ).is( ":data( 'ui-draggable' )" ); //false
+			
+ +

You can also use :data to get a list of all elements that are instances of a given widget.

+ +

+				$( ":data( 'ui-progressbar' )" );
+