I have an insert and load record (jQuery & PHP) script working fine without using AJAX. but after the AJAX call, insert (jQuery) doesn't work.
This is my code:-
$(".insert").live("click",function() { var boxval = $("#content").val(); var dataString = 'content='+ boxval; if(boxval==''){ alert("Please Enter Some Text"); } else{ $.ajax({ type: "POST", url: "demo.php", data: dataString, cache: false, success: function(html){ $("table#update tbody").prepend(html); $("table#update tbody tr").slideDown("slow"); document.getElementById('content').value=''; } }); } return false; }); $(".load").live("click",function() { $.ajax({ type: "POST", url: "test.php", success: function(msg){ $("#container").ajaxComplete(function(event, request, settings){ $("#container").html(msg); }); } }); }); });