I’m trying to customise the following Auto Suggest jQuery plugin:
Ajax autocomplete with AJAX
What I’m having trouble with is the autocomplete div which id is generated randomly using the following method:
uid = Math.floor(Math.random() * 0x100000).toString(16);
This way even few instances of the plugin are wrapped with divs having unique ids but these ids obviously change every time sript is called. What I’m trying to achieve is to be able to generate the unique id for each instance but same each time so I can reference to it using CSS. I tried for loop but with no luck.
Any help appreciated.
The whole plugin code can be found here:
plugin code
How about using the class name instead?
alternatively use jquery to access divs with names beginning with Autocomplete:
Or