JQuery ajaxSuccess method () will execute when Ajax request has completed. JQuery has full suite capabilities with Ajax. JQuery function give us functionality to read data from server without refreshing the page. In this article I am trying to show you that how we can implement ajaxSuccess () method in page. For example I want to read “Jquery.txt” files from server. When file has loaded successfully then this method will show message (“Notepad file loaded”).
<title>JQuery ajaxComplete method</title>
$("div").ajaxSuccess(function() //this function will execute when file has loaded successfully from server
alert("Notepad file loaded ");
$("div").load("Jquery.txt");//load method will load text file from server.
<h2>JQuery ajaxComplete() method</h2> this is a heading
<div style="height: 176px; width: 311px; background-color:Yellow"> <!--div element is used to show notepad file -->
Click to read</button>
When Click to read button is clicked popup window will show message as shown below: