Skip to content

Commit 58cb7be

Browse files
committed
Merge pull request jquery#93 from jquery/86/91
Combines Using jQuery Core and jQuery Basics into a single chapter, merge types content into a single article.
2 parents eddb7fc + b61492f commit 58cb7be

17 files changed

+44
-41
lines changed

Rules

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ preprocess do
8686
@chapterOrder = [
8787
"getting-started",
8888
"javascript-101",
89-
"jquery-basics",
9089
"using-jquery-core",
9190
"events",
9291
"effects",

content/javascript-101/types.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,28 @@ alert(foo.length);
161161

162162
There are many more methods for manipulating arrays, details can be found on the [MDN Document](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array "MDN - Array Reference")
163163

164+
## Type Checking With jQuery
164165

166+
jQuery offers a few basic utility methods for determining the type of a
167+
specific value.
168+
169+
<javascript caption="Checking the type of an arbitrary value">
170+
var myValue = [1, 2, 3];
171+
172+
// Using JavaScript's typeof operator to test for primative types
173+
typeof myValue == 'string'; // false
174+
typeof myValue == 'number'; // false
175+
typeof myValue == 'undefined'; // false
176+
typeof myValue == 'boolean'; // false
177+
178+
// Using strict equality operator to check for null
179+
myValue === null; // false
180+
181+
// Using jQuery's methods to check for non-primative types
182+
jQuery.isFunction(myValue); // false
183+
jQuery.isPlainObject(myValue); // false
184+
jQuery.isArray(myValue); // true
185+
</javascript>
165186

166187

167188

content/jquery-basics/dex.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

content/jquery-basics/attributes.md renamed to content/using-jquery-core/attributes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
chapter : jquery-basics
2+
chapter : using-jquery-core
3+
level : beginner
34
section : 4
45
title : Attributes
56
---

content/using-jquery-core/avoid-conflicts-other-libraries.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
chapter : jquery-core
2+
chapter : using-jquery-core
3+
level: beginner
34
section : 6
45
title : Avoiding Conflicts with Other Libraries
56
attribution: jQuery Fundamentals

content/using-jquery-core/checking-types.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

content/jquery-basics/css-styling-dimensions.md renamed to content/using-jquery-core/css-styling-dimensions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
chapter : jquery-basics"
2+
chapter : using-jquery-core
3+
level: beginner
34
section : 3
45
title : CSS, Styling, & Dimensions
56
---

content/using-jquery-core/data-methods.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : jquery-core
33
section : 4
44
title : Data Methods
55
attribution: jQuery Fundamentals
6+
level: intermediate
67
---
78
As your work with jQuery progresses, you'll find that there's often data about
89
an element that you want to store with the element. In plain JavaScript, you

content/jquery-basics/document-ready.md renamed to content/using-jquery-core/document-ready.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
chapter : jquery-basics
3+
level: beginner
34
section : 1
45
title : $(document).ready()
56
---
@@ -63,4 +64,4 @@ Lets take a look at how both the events act. The below example tries to load som
6364
</body>
6465
</html>
6566

66-
</javascript>
67+
</javascript>

content/using-jquery-core/dollar-object-vs-function.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2-
chapter : jquery-core
2+
chapter : using-jquery-core
33
section : 1
44
title : $ vs $()
55
attribution: jQuery Fundamentals
6+
level: beginner
67
---
78
Until now, we’ve been dealing entirely with methods that are called on a jQuery
89
object. For example:

content/using-jquery-core/feature-browser-detection.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
chapter : jquery-core
2+
chapter : using-jquery-core
33
section : 5
44
title : Feature & Browser Detection
5+
level: intermediate
56
attribution: jQuery Fundamentals
67
---
78
## Feature & Browser Detection

content/jquery-basics/manipulating-elements.md renamed to content/using-jquery-core/manipulating-elements.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2-
chapter : jquery-basics
2+
chapter : using-jquery-core
33
section : 6
44
title : Manipulating Elements
55
attribution: jQuery Fundamentals
6+
level: beginner
67
---
78
Once you've made a selection, the fun begins. You can change, move, remove, and clone elements.
89
You can also create new elements via a simple syntax.

content/jquery-basics/selecting-elements.md renamed to content/using-jquery-core/selecting-elements.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
chapter : jquery-basics
2+
chapter : using-jquery-core
33
section : 2
44
title : Selecting Elements
5+
level: beginner
56
---
67

78
The most basic concept of jQuery is to “select some elements and do something with

content/jquery-basics/traversing.md renamed to content/using-jquery-core/traversing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
chapter : jquery-basics
2+
chapter : using-jquery-core
33
section : 5
44
title : Traversing
5+
level: beginner
56
---
67
## Traversing
78

content/using-jquery-core/utility-methods.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2-
chapter : jquery-core
2+
chapter : using-jquery-core
33
section : 2
44
title : Utility Methods
55
attribution: jQuery Fundamentals
6+
level: beginner
67
---
78
jQuery offers several utility methods in the $ namespace. These methods are
89
helpful for accomplishing routine programming tasks. Below are examples of a

content/jquery-basics/working-with-selections.md renamed to content/using-jquery-core/working-with-selections.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
chapter : jquery-basics
2+
chapter : using-jquery-core
33
section : 3
44
title : Working with Selections
5+
level: beginner
56
---
67
Once you have a selection, you can call methods on the selection.
78
Methods generally come in two different flavors: getters and setters.

0 commit comments

Comments
 (0)