JavaScript Methods: $()

By: Dusty Arlia
Published on Sunday, September 22, 2013, 12:18 PM
Last Updated on Wednesday, July 01, 2015 at 7:55 PM
Total Updates: 4

From inside your web browser's console you can use this shortcut function: $(), instead of document.getElementById(). You can use it to select an element:

$('h1')

An id:

$('#example_id')

Or a class:

$('.example_class')

This function is the same as jQuery's $() function except that it is not jQuery. This function is a built-in JavaScript function of the ConsoleCommandLine object.

Comments:

Ad: