From 518a4cd2739e8f89efdb83fe7263b712b2cfeb4e Mon Sep 17 00:00:00 2001 From: An Phan Date: Thu, 29 Jan 2015 16:57:36 +0800 Subject: [PATCH 1/3] Added a JS q regarding window.onload and $(document).ready() --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4775a67..b4cd608 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ duplicate([1,2,3,4,5]); // [1,2,3,4,5,1,2,3,4,5] * What is `"use strict";`? what are the advantages and disadvantages to using it? * Create a for loop that iterates up to `100` while outputting **"fizz"** at multiples of `3`, `"buzz"` at multiples of `5` and **"fizzbuzz"** at multiples of `3` and `5` * Why is it, in general, a good idea to leave the global scope of a website as-is and never touch it? +* What is the difference between `window.onload` and jQuery's `$(document).ready()`? #### jQuery Questions: From 0e6aff706b9621ef559a6bf89931f3e9ec556bb9 Mon Sep 17 00:00:00 2001 From: An Phan Date: Thu, 29 Jan 2015 22:32:21 +0800 Subject: [PATCH 2/3] Moved the window.onload vs jQuery.ready question under jQuery section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b4cd608..0c2beef 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,6 @@ duplicate([1,2,3,4,5]); // [1,2,3,4,5,1,2,3,4,5] * What is `"use strict";`? what are the advantages and disadvantages to using it? * Create a for loop that iterates up to `100` while outputting **"fizz"** at multiples of `3`, `"buzz"` at multiples of `5` and **"fizzbuzz"** at multiples of `3` and `5` * Why is it, in general, a good idea to leave the global scope of a website as-is and never touch it? -* What is the difference between `window.onload` and jQuery's `$(document).ready()`? #### jQuery Questions: @@ -154,6 +153,7 @@ duplicate([1,2,3,4,5]); // [1,2,3,4,5,1,2,3,4,5] * Name 4 different values you can pass to the jQuery method. * Selector (string), HTML (string), Callback (function), HTML element, object, array, element array, jQuery Object, etc. * What is the difference between `.get()`, `[]`, and `.eq()`? +* What is the difference between `window.onload` and jQuery's `$(document).ready()`? #### Coding Questions: From 64a0b8429b80da63ceca2c6383e0cbd26c0dcca3 Mon Sep 17 00:00:00 2001 From: An Phan Date: Fri, 30 Jan 2015 01:13:46 +0800 Subject: [PATCH 3/3] Reworded the question following @arthurvr's suggestion --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c2beef..5a37547 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ duplicate([1,2,3,4,5]); // [1,2,3,4,5,1,2,3,4,5] * What is `"use strict";`? what are the advantages and disadvantages to using it? * Create a for loop that iterates up to `100` while outputting **"fizz"** at multiples of `3`, `"buzz"` at multiples of `5` and **"fizzbuzz"** at multiples of `3` and `5` * Why is it, in general, a good idea to leave the global scope of a website as-is and never touch it? +* Why would you use something like the `load` event? Does this event have disadvantages? Do you know any alternatives, and why would you use those? #### jQuery Questions: @@ -153,7 +154,6 @@ duplicate([1,2,3,4,5]); // [1,2,3,4,5,1,2,3,4,5] * Name 4 different values you can pass to the jQuery method. * Selector (string), HTML (string), Callback (function), HTML element, object, array, element array, jQuery Object, etc. * What is the difference between `.get()`, `[]`, and `.eq()`? -* What is the difference between `window.onload` and jQuery's `$(document).ready()`? #### Coding Questions: