Change Image Src With Jquery Autocomplete
I have this jQuery autocomplete function that works terrifically. But, I wanna make it so that when the user clicks on one of the choices from the drop down box and the value is th
Solution 1:
I don't know if this will really work but:
$('#team').autocomplete(data)
.result(function(event, item) {
$('img#team_wallpaper').attr("src", "mlb/" +item.text+ ".png");
});
See: http://docs.jquery.com/Plugins/Autocomplete#API_Documentation at the very bottom "Search Page Replacement"
Post a Comment for "Change Image Src With Jquery Autocomplete"