id on click help

id on click help

I'm having a problem with referencing #dropdown-suggestion ...when I use the on click function to create a action nothing happens...any ideas please...thank you...other than that all code works great

  1. $( '#' + selector).data( 'ui-autocomplete' )._renderMenu = function (ul, items)

    {

    var that = this ;

    $.each( items, function ( index, item )

    {

    that._renderItemData( ul, item );

    });

    $(ul)

    .attr( 'tabindex' , -1 )

    .addClass( 'dropdown-menu' );

    $( '<li></li>' )

    .append( "<a>Hide Suggestion</a>" )

    .addClass( 'dropdown-suggestion' )

    .appendTo(ul);

    };


  2. $( '#dropdown-suggestion' ).click( function ()

    {

    //not executing
  3. alert( 'hide' );
  4. });