deepEqual( wrapper[0], $( "<div>" ).testWidget().testWidget( "widget" )[0] );
});
+test( ".instance()", function() {
+ expect( 1 );
+ var div,
+ _test = function() {};
+
+ $.widget( "ui.testWidget", {
+ _create: function() {},
+ _test: _test
+ });
+ div = $( "<div>" ).testWidget();
+ equal( div.testWidget( "instance" ), div.data( "ui-testWidget" ) );
+});
+
test( "._on() to element (default)", function() {
expect( 12 );
var that, widget;
return $.error( "cannot call methods on " + name + " prior to initialization; " +
"attempted to call method '" + options + "'" );
}
+ if ( options === "instance" ) {
+ returnValue = instance;
+ return false;
+ }
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
}