javascript - How to fire a jquery function when selecting an auto complete item -
i have next view within asp.net mvc razor view:-
@html.textboxfor(model => model.technology2.tag,new { @class = "pcolor"})
and specify jquery function auto finish on above textbox:-
$("#technology2_tag").autocomplete({ minlength: 1, delay: 1000, source: function (request, response) { $.ajax({ url: "@url.content("~/switch/autocomplete2")",
and working well. need fire jquery function after user select auto finish item. tried , did not work:-
$("#technology2_tag").change(function () {
what need fire jquery on selected autocomplete item ? can advice ?
you'd utilize .select() event instead on .change() here jquery documentation
$("#technology2_tag").change(function (event, ui) {....}
javascript jquery razor
No comments:
Post a Comment