I am using jQuery auto complete in my web site. I want go to the search result page when user click on the drop down option.. For that I used the “Select” event , but it doesn’t fire during select event.
Any ideas ? here is the code
$(function(){
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Haskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$('#autocomplete').autocomplete({
source: availableTags,
select: function(event,ui){
alert("Selected ");
}
});
Your missing the closing brackets for your
$(function() {– you need to add});at the end ..Then it works fine
Also ensure you have added the correct JS libraries and CSS