This might help with your problem:
http://www.learningjquery.com/2006/09/sacrificial-lambda
Michel Brouckaert wrote:
>
> I have a problem when i load some content into the body of my page, it
> seems
> that the event listeners that i attached to the body of my code doesn't
> get
> attached to dynamicly changed content. I found an alternative solution to
> this by using the getScript function.
>
> $.getScript("js/loadeable.js");
>
> but this works only 50/50, because if load the same function two times,
> wich
> happens if you use one link two times..the event listeners get also
> attached
> two times...wich results in a couple of 100 page loads if you use a couple
> of links...
>
> is there an (probably obvious) solution for this.
> by for example allready defining the listeners before the content is
> loaded.
>
> greetings,
> Michel Brouckaert
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
--
View this message in context:
http://www.nabble.com/function-problems-dynamic-content-tf3388967.html#a9433739
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/