load content into the same div two times
hello,
in one page i have:
........
$("#tree_data").load("?", {action: 'EDIT_MENU_ITEM', menu_item_id: data.rslt.obj.attr('id'), nid: 3});
........
<div id="tree_data" style="padding: 0 5px 0 10px;"></div>
html loading in div "tree data". In this html i have submit button. i want click this button and change content in the same div "tree_data". in this html i have:
.......
$("#form_edit").submit(function(){
$.post(
"?action=EDIT_MENU_ITEM&submit=true&nid=<?php echo $_REQUEST['nid']?>",
$("#form_edit").serialize(),
function(data){
if (data.success) {
$("#tree_data").html("TEST");
}
}
);
return false;
});
but jquery not find #tree_data in this html.
???