Hiya, I'm really new at jquery, but not programming. I'd like to display some items dynmically from a DB, and have them call a common jquery function onclick, passing some params.
this is a snippet of my Client side code >> $('#open-frame').click(function() { url = $(this).attr("url"); h = $(this).attr("h"); w = $(this).attr("w"); $("#dialog").dialog.height=parseInt(h)+40; $("#dialog").data("width.dialog", parseInt(w)+35); var numRand = Math.floor(Math.random()*101) setIframe('theFrame',h,w,url + "&" + numRand); $('#dialog').dialog('open'); } Server Side output ------------------------------------------- <div id="open-frame" url="/page1.asp" h="300" w="400" class="">long text 1 that should do something onclick</div> <div id="open-frame" url="/page2.asp" h="300" w="400" class="">long text 2 that should do something on click</div> <div id="open-frame" url="/page3.asp" h="300" w="400" class="">ect.....</div> i realize we can't have duplicate ids, but i can't figure out how to do this any other way -- well i could by using the old onClick function --- but I can't figure out how to do it the jquery way. thanks for any help. Best, BC