I have a strange problem here, and I can't figure it out. I've got a
web page with 2 divs - #menu and #content. When the page loads, it
automatically pulls data from another page and loads it into #menu.
Here's my script:
$(document).ready(function() {
function addClickHandlers = function() {
$("a").click(function() {
$("#content").load(this.href, addClickHandlers);
return false;
});
};
$("#menu").load("/ekklesia/users/listUsers",
addClickHandlers());
});
/ekklesia/users/listUsers lists users in the menu with a link to another
page. When I click a link the first time, it loads the new page into
#content and then runs addClickHandlers so that links inside my new page
will also load info into #content.
When I click another #menu link, it loads the new page into #content
twice. The next time, it loads it 4 times. After that 8, 16, etc.
Anybody have any idea what's wrong?
Thanks in advance!
Mark
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/