views:

22

answers:

0

Hi,

Using:

.data( "autocomplete" )._renderItem = function( ul, item ) {
                var temp = item.url.substring(16, item.url.length)
                return $( "<li></li>" )
                .data( "item.autocomplete", item )
                .append( "<a>" + item.value + "<br>" + item.url + "<br>" + item.description + "<br>" + "Support URL: " + item.support_url + "<br>" + "Contact: " + "<a href=" + item.contact + ">Test</a>" + "<br />" + "</a>"  )
                .appendTo( ul )

jQuery is parsing the item.url and automatically making that a href in the html. I'd like to manually control what becomes an href so that I can do something like "<a href='" + item.url + ">" + item.title "</a>"

The way jQuery handles that now is making item.url an href and adding my html href and not using the title properly.

In an older version of autocomplete I was able to do a .result(function(event, item) { location.href = item.url; }); but that doesn't seam to be supported here.