I'm trying to create a search function using jQuery Autocomplete. I have an accordion for the main navigation, that, when each link is clicked, the following code is executed and some external content is loaded into a div (with a class of 'detail').
$(".football1").click(function(){
$.get('football/game1.html', function(data) {
$('.detail').empty().append(data);
});
});
For the auto complete, I have:
$(function() {
var availableTags = [
"footballGame1",
"footballGame2",
"footballGame3",
"basketballGame1",
"basketballGame2",
"basketballGame3",
];
$( "#tags" ).autocomplete({
source: availableTags
});
});
What I want is that, when someone searches one of the tags, the script is executed and the page is dynamically loaded.
Is this possible? And if so, whats the best way to go about it?