What is JQuery Callback Function

What is JQuery Callback Function?

A call back function executed after the current event has completed. Java Script code executes line by line. However, if next line of code executes even before completing the action(s) which wrote in previous lines. This may create an error.



To avoid this we can create aa callback function Below is a sample script for Jquery Callback function.

<script>
        $(document).ready(function () {
            $("button").click(function () {
                $("p").hide("slow", function () {
                    alert("This line is now hide.");
                });
            });
        });

</script>

Comments

Popular

Top 8 C# 6.0 Features

SharePoint Interview Questions and Answers

Calling ASP.Net WebMethod using jQuery AJAX

What is Cloud Computing - A guide for beginners