Explain the concepts of "$ function" in jQuery with an example.
- The syntax of this function is tailor made and used for selecting the HTML elements and perform some actions on the elements.
Syntax:$(selector).action()
- The $ sign is used to define/access jQuery.
- The (selector) is used to query or find the HTML elements.
- The action() is performed on the elements.
- There are a lot of anonymous functions in jquery.
Example:$(document).ready(function() {});
$("a").click(function() {});
$.ajax(
{
url: "someurl.php",
success: function() {}
});