[jQuery] Dynamic Links

[jQuery] Dynamic Links


Hi,
I am new to JQuery, can anyone help how to generate dynamic links. I
have a loop which generate some links and for each, an onclick event
is attached, calling a javascript method with some arguments. some
thing like this,
for(x = 0; x<items.length; x++)
<a href="#" onclick="getData(items[x].id);" >Get data </a>
how can i generate such a grid using Jquery. Actually i have to
display an overlay on each click, and data will be loaded dynamically
in the overlay, so how can i pass the ID to the method?
Thanks