is there any way to overwrite select event?
i'm using jquery ui auto-complete i would like the reuslts to not insert into input but to go to pa开发者_StackOverflowge that link it if that make any sense
just write your own function inside the select
property of autocomplete to redirect
select: function( event, ui )
{
location.href = ui.item.link;
return false;
}
you have to set a field representing the link where to redirect in your json result. On the example above link
.
Json ouptut would be:
{
"label" : "your_label",
"value" : "your_value",
"link" : "your_link"
}
精彩评论