jQuery

Updated: 13 December 2023

Get version of jQuery from the console

$().jquery

Document ready

$( document ).ready(function() {
    // Will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute.
    console.log( "ready!" );
});

// equivalent shorthand version
$(function() {
    // Will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute.
    console.log( "ready!" );
});

jQuery plugins

Updated: 10 September 2022

The javascript in a jQuery plugin like Bootstrap expects there to be a global jQuery variable that it can modify, for example by adding a tooltip() method.