jQuery
New Wave Javascript


discuss » dynamically loading html into a container and then....


Posted: Tue Jan 31 07:29:29 EST 2006
From: Mark Panay <markpanay at gmail.com >

Another quick question that i'm sure is already sorted in JQuery...

I can dynamically load html into a container using AHAH, no problem.
But the only way (that i know how) to attach events to this "new" html
is add the evnts to each element in the remote page... they do not
seem to attach, i presume some sort of refresh is necessary?

What I would like to do is load an unordered list (with no javascript)
attach an event to each LI and then be able to tell which one is which
(i.e. the contents) when it's clicked.

At the moment I attach a unique ID to each LI and a javascript
function call with the unique ID on the server...

I hope thismakes sense..

Thanks (again)

mark.


--
Mark Panay
www.MarkPanay.com