Demos: Updating to use instance method on bridge

This commit is contained in:
Corey Frang 2013-01-30 08:30:35 -06:00 committed by Jörn Zaefferer
parent 36cb6f264d
commit 38c7b1ca81
5 changed files with 5 additions and 5 deletions

View File

@ -154,7 +154,7 @@
this._delay(function() { this._delay(function() {
this.input.tooltip( "close" ).attr( "title", "" ); this.input.tooltip( "close" ).attr( "title", "" );
}, 2500 ); }, 2500 );
this.input.data( "ui-autocomplete" ).term = ""; this.input.autocomplete( "instance" ).term = "";
}, },
_destroy: function() { _destroy: function() {

View File

@ -66,7 +66,7 @@
return false; return false;
} }
}) })
.data( "ui-autocomplete" )._renderItem = function( ul, item ) { .autocomplete( "instance" )._renderItem = function( ul, item ) {
return $( "<li>" ) return $( "<li>" )
.append( "<a>" + item.label + "<br>" + item.desc + "</a>" ) .append( "<a>" + item.label + "<br>" + item.desc + "</a>" )
.appendTo( ul ); .appendTo( ul );

View File

@ -29,7 +29,7 @@
// don't navigate away from the field on tab when selecting an item // don't navigate away from the field on tab when selecting an item
.bind( "keydown", function( event ) { .bind( "keydown", function( event ) {
if ( event.keyCode === $.ui.keyCode.TAB && if ( event.keyCode === $.ui.keyCode.TAB &&
$( this ).data( "ui-autocomplete" ).menu.active ) { $( this ).autocomplete( "instance" ).menu.active ) {
event.preventDefault(); event.preventDefault();
} }
}) })

View File

@ -48,7 +48,7 @@
// don't navigate away from the field on tab when selecting an item // don't navigate away from the field on tab when selecting an item
.bind( "keydown", function( event ) { .bind( "keydown", function( event ) {
if ( event.keyCode === $.ui.keyCode.TAB && if ( event.keyCode === $.ui.keyCode.TAB &&
$( this ).data( "ui-autocomplete" ).menu.active ) { $( this ).autocomplete( "instance" ).menu.active ) {
event.preventDefault(); event.preventDefault();
} }
}) })

View File

@ -23,7 +23,7 @@
} }
}); });
$( "#destroy" ).click(function() { $( "#destroy" ).click(function() {
if ( spinner.data( "ui-spinner" ) ) { if ( spinner.spinner( "instance" ) ) {
spinner.spinner( "destroy" ); spinner.spinner( "destroy" );
} else { } else {
spinner.spinner(); spinner.spinner();