You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,9 @@ It allows you to quickly move from basic BS into crazy advanced DOM manipulation
53
53
54
54
---
55
55
56
+
### Sample Code
57
+
Have a solid look through the code included in this repo. It gives a 1000ft overview of basic jQuery functionality.
58
+
56
59
### Event Delegation
57
60
Event delegation refers to the process of using event propagation (bubbling) to handle events at a higher level in the DOM than the element on which the event originated. It allows us to attach a single event listener for elements that exist now or in the future.
58
61
@@ -72,6 +75,8 @@ var delegatedEventListener = function(){
72
75
73
76
```
74
77
78
+
**Translation** - Make this your DEFAULT pattern. Using this pattern for building event listeners allows you on listen to DOM elements which will be dynamically placed on the page after the initial load.
79
+
75
80
### The DOM:
76
81
77
82
DOM === Document Object Model
@@ -86,11 +91,11 @@ jQuery DOM features include:
86
91
- AJAX
87
92
- Various utilities
88
93
89
-
####AJAX:
94
+
### AJAX:
90
95
91
96
Specifically for AJAX, jQuery has its own flavor of AJAX which happens to be the flavor we teach @DBC. Being good with jQuery selectors is 3/4 of the battle when writing your jQuery flavored AJAX. The AJAX pattern itself is fairly simple. The selection and manipulation of DOM elements using jQuery around an AJAX call is the tricky bit.
92
97
93
-
####ProTip:
98
+
### ProTip:
94
99
Chrome defines ```$()``` as well. This is not jQuery. Always be sure you have **_actually_** loaded jQuery into your project. If you can select an element with $ but cannot run various jQuery methods on it this is most likely the culprit (Laugh now... Its happened to better Devs than you friend ;-)
95
100
96
101
__From this point forward your Chrome Dev Tools should never be closed.__
0 commit comments