Sunday, January 14, 2024

jQuery

 Wrapper function

=================

A function that is executed once the page has been finished loading

$(function () { //all our code will be in here... })

Most jQuery code that we see in the wild resides within some kind of wrapper like this. Using $(function(){}); is a shortcut to jQuery's document.ready function, which is fired once the DOM for the page has loaded

===============================

https://www.paulirish.com/2009/perf/

=========================


window object is also known as the Global Namespace. The main concept of namespacing is to provide a way to logically group all the related pieces of a distinct and self-contained part of an application.

No comments:

Post a Comment