Code fix to easily extend the object and events

Roberto's Avatar


23 Jan, 2013 03:23 PM

I changed the following code:
var formatted = $('


To this:
var formatted = $('


This way you can easily do on mouse hover the item and do cool stuff like adding an thumbnail.

var obj_suggest = $("#obj-1").autoSuggest(data.items, {

        resultsComplete:function() {
                function () {
                    $(this).append($("<span> &nbsp; <img src='/backoffice/thumbs/"+ parseInt($(this).attr('data-id').replace(/[^0-9]/gi,'')) +".jpg' width='80' height='80' /></span>"));
                function () {
  1. 1 Posted by Roberto on 23 Jan, 2013 03:25 PM

    Roberto's Avatar

    ` //var formatted = $('


    var formatted = $('



Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac