javascript - How to add a Button/Link to the last item in a list of search results -


i'm trying add button last item in list of results generating using jquery autocomplete. currently, each list item created so:

create: function(item) {      $(this).data('ui-autocomplete')._renderitem = function (ul, item) {     return $('<li>')        .append('<a>' + item.label + " " + " - " + item.type +'</a>')        .appendto(ul);     }; 

},

what i'd when last element in list add button, can't figure out how that. i'd appreciate help.

you can use jquery pseudo selector last item.

$('li:last')


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -