diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2010-12-22 18:58:57 +0100 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2010-12-22 18:58:57 +0100 |
commit | 0479ab6af6414c7a8e779c3cab3e7e8406f9eb62 (patch) | |
tree | cab8e0ea33ef3db131877d307a2b7c7099b7709e /demos/autocomplete | |
parent | 3552947c19b8ea1b779dc9809783c6ac6a218d68 (diff) | |
parent | 1fd34199efa9ddc35276b415cad8e7e37a6cc856 (diff) | |
download | jquery-ui-0479ab6af6414c7a8e779c3cab3e7e8406f9eb62.tar.gz jquery-ui-0479ab6af6414c7a8e779c3cab3e7e8406f9eb62.zip |
Merge remote branch 'origin/tooltip'
Conflicts:
demos/autocomplete/combobox.html
demos/index.html
tests/unit/index.html
Diffstat (limited to 'demos/autocomplete')
-rw-r--r-- | demos/autocomplete/combobox.html | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/demos/autocomplete/combobox.html b/demos/autocomplete/combobox.html index f74f0f106..fd373f0e4 100644 --- a/demos/autocomplete/combobox.html +++ b/demos/autocomplete/combobox.html @@ -11,6 +11,7 @@ <script src="../../ui/jquery.ui.position.js"></script> <script src="../../ui/jquery.ui.menu.js"></script> <script src="../../ui/jquery.ui.autocomplete.js"></script> + <script src="../../ui/jquery.ui.tooltip.js"></script> <link rel="stylesheet" href="../demos.css"> <style> .ui-button { margin-left: -1px; } @@ -66,8 +67,10 @@ }); if ( !valid ) { // remove invalid value, as it didn't match anything - $( this ).val( "" ); - select.val( "" ); + $(this).val( "").attr( "title", value + " didn't match any item" ).tooltip( "open" ); + setTimeout( function() { + input.tooltip( "close" ).attr( "title", "" ); + }, 2500 ); input.data( "autocomplete" ).term = ""; return false; } @@ -106,6 +109,12 @@ input.autocomplete( "search", "" ); input.focus(); }); + + input.tooltip( { + position: { + offset: (this.button.width() + 5) + " 0" + } + }).tooltip( "widget" ).addClass( "ui-state-highlight" ); }, destroy: function() { |