Shawn schrieb:
I was able to get the alternating row colors with this code:
$("#dialogTSKComp").autocomplete(
"xhr/autocomplete_company.cfm", {
formatItem : function (data, pos, qty) {
if (pos % 2 == 0) {
return "<div class=\"ac_odd\">" + data[0] + "</div>";
}
return data[0];
}
}
);
And then setting up a CSS style for .ac_odd. But this is adding a DIV
wrapper for this specific task. I'd rather just set the class on the
produced LI tag. Is there anyway to do that? Or a better way to
accomplish this?
Your workaround is what I would have proposed. I'll look into a better
solution, maybe just always adding the class - then its up to you to
only set appropiate styles.
Jörn