autocomplete ._renderItem and adding a Class to wrapper

前端 未结 3 1561
清酒与你
清酒与你 2020-12-16 22:51

Going off the example here http://jqueryui.com/demos/autocomplete/#custom-data I\'m wondering how to add a style to the ul wrapper when using _renderItem(

3条回答
  •  爱一瞬间的悲伤
    2020-12-16 23:00

    When using jQuery UI 1.10, I used Andrew Whitaker's answer, but I had to change

    $(this).data("autocomplete").menu.element.addClass("my_class");
    

    to

    $(this).data("uiAutocomplete").menu.element.addClass("my_class");
    

提交回复
热议问题