Here would be one simple way to do it, tapping into the open
event:
$("#auto").autocomplete({
source: /* ... */,
open: function () {
$(this).data("autocomplete").menu.element.addClass("my_class");
}
});
jQueryUI >= 1.9
$("#auto").autocomplete({
source: /* ... */,
open: function () {
$(this).data("uiAutocomplete").menu.element.addClass("my_class");
}
});
menu
is an internal widget that autocomplete uses.
Example: http://jsfiddle.net/bx8Ye/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…