Skip to content

Commit 3706182

Browse files
committed
uniform formatting
1 parent e03a6e6 commit 3706182

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# jQuery intro notes:
22

33
#### Before you start:
4+
45
Be sure you have a solid understanding of [this](https://zellwk.com/blog/this/).
56

67
### General Notes
@@ -71,7 +72,9 @@ Get REALLY comfortable with CSS selectors. They are the heart of the library and
7172
---
7273

7374
### Sample Code
74-
Have a solid look through the code included in this repo. It gives a 1000ft overview of basic jQuery functionality.
75+
Have a solid look through the code included in this repo. It gives a 1000ft overview of basic jQuery functionality. Open up the index.html and toggle functions in ```0_main.js``` to see their effects.
76+
77+
---
7578

7679
### Event Delegation
7780
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.
@@ -93,6 +96,8 @@ var delegatedEventListener = function(){
9396

9497
**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.
9598

99+
---
100+
96101
### The DOM:
97102

98103
DOM === Document Object Model
@@ -107,6 +112,8 @@ jQuery DOM features include:
107112
- AJAX
108113
- Various utilities
109114

115+
---
116+
110117
### AJAX:
111118

112119
AJAX is my **FAVORITE** part of Javascript, it's the part that talks to Ruby!
@@ -193,15 +200,21 @@ end
193200

194201
In the ```GET``` route above we are sending a partial back to AJAX. In the ```POST``` route we are sending back the @dog object as JSON. Same rules as always applies here. _Be VERY aware of what_ your methods are returning. If you are expecting a partial and get JSON your AJAX will fail. :-(
195202

203+
---
204+
196205
### ProTip:
197206
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 ;-)
198207

208+
---
209+
199210
### Final Thought
200211

201212
*Chrome Dev Tools* __From this point forward they should never be closed when you are developing.__
202213

203214
What's the first 2 rules of debugging?!? __READ THE ERROR MESSAGE__. Where do we find JS error messages...? In the Dev Tools Console!
204215

216+
---
217+
205218
## More Nice Links:
206219

207220
[Great jQUery tutorial](http://learn.shayhowe.com/advanced-html-css/jquery/)

0 commit comments

Comments
 (0)