Back

Explore Courses Blog Tutorials Interview Questions
0 votes
4 views
in Web Technology by (6.1k points)

What does $ sign signify in the following code:

$(window).bind('load', function() {

    $('img.protect').protectImage();

});

1 Answer

0 votes
by (11.7k points)
edited by

Dollar sign $ in javascript is nothing but an identifier, which means it is used to identify an object. Identifiable objects include variables, functions, events, properties and objects. 

Dollar $ sign is an alternative to a function document.getElementById(). 

Also dollar $ is alias to Jquery by default. Directly Jquery can also be used by default. Jquery is nothing but a javascript library. When we use it in a web page, its own object is created by it. Dollar $ sign holds the reference to that object. Later in the program, $ Dollar sign can be used to recall any method.  

Want to become an expert in web technology, check out the Web Development course offered by Intellipaat!

Browse Categories

...