sorry about this, found the problem with my code,I did put the function
names into my callbacks rather then my functions themselves..
thx for the help
2007/3/12, Michel Brouckaert <[EMAIL PROTECTED]>:
doesn't really seem to work...
the event listeners won't get loaded..somehow..i can totally wrong about
this but this is what i had written...
code:
$("document").ready(function(){
prepare();
});
prepare = function(){
$("a#next").click(function(){
//session bind
sessionBind();
return false;
});
$("a#link").click(function(){
//autocomplete
autoComplete();
return false;
});
}
sessionBind = function(){
//
res = $.post("list.php
",{"id":2,"sessionID":sessionID,"getValue":1},function(html){
$("div#tripwire").empty();
test = res.responseText;
$("div#tripwire").load(activateForm).append(html).load();
});
}
and here you find the activateForm part...
activateForm = function(){
alert("beep");
//attach listeners to form
$("#text").keyup(function(){
$("#live").empty().append($(this).val());
});
}
2007/3/12, Yansky <[EMAIL PROTECTED]>:
>
>
> 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/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/