mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Demos: Updating to use instance method on bridge
This commit is contained in:
parent
36cb6f264d
commit
38c7b1ca81
@ -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() {
|
||||||
|
@ -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 );
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user