diff options
Diffstat (limited to 'leafymiracle/static/js/searchbar_html_support.js')
-rw-r--r-- | leafymiracle/static/js/searchbar_html_support.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/leafymiracle/static/js/searchbar_html_support.js b/leafymiracle/static/js/searchbar_html_support.js new file mode 100644 index 0000000..4d07901 --- /dev/null +++ b/leafymiracle/static/js/searchbar_html_support.js @@ -0,0 +1,14 @@ +// Add the hook in for catcomplete. +// We add it here instead of a tw2.jquery_ui template because it must +// be executed before *any* other plugins reference jquery ui proper + +$(document).ready(function() { + $.widget( "custom.catcomplete", $.ui.autocomplete, { + _renderItem: function( ul, item) { + return $( "<li></li>" ) + .data( "item.autocomplete", item ) + .append( $( "<a></a>" ).html( item.label ) ) + .appendTo( ul ); + } + }); +}); |