I'm trying to load a div. Load () when the menu-element is clicked, this function is triggered:
function newPage (p_id) {var id = p_id; $ ("# Div"). Load ("content.php? Id =" + id); do something(); DoAnotherThing (); } content.php works fine but doSometing () ; This is not happening the next time I click on the menu-element, doSomething () ; And doAnotherThing () ; Is removed and then the function starts from the beginning and prevents it before doSomething () ; Of course I intend to execute the function on every click from the beginning. Can anyone help?
Try:
$ ("# div"). Load ("content.php? Id =" + id, function () {doSomething (); doAnotherThing ();});
No comments:
Post a Comment