Skip to content

Commit 8ba7ebd

Browse files
author
Rebecca Murphey
committed
tags for perf items
1 parent 14c0db9 commit 8ba7ebd

12 files changed

+12
-0
lines changed

content/performance/append-outside-loop.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Cache Length During Loops
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
Touching the DOM comes at a cost; if you're adding a lot of elements to the

content/performance/beware-anonymous-functions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Beware Anonymous Functions
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
Anonymous functions bound everywhere are a pain. They're difficult to debug,

content/performance/cache-loop-length.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Cache Length During Loops
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
In a for loop, don't access the length property of an array every time; cache

content/performance/clever-conditionals.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Clever Conditionals
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
// old way

content/performance/detach-elements-before-work-with-them.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Detach Elements to Work with Them
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
The DOM is slow; you want to avoid manipulating it as much as possible. jQuery

content/performance/dont-act-on-absent-elements.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Don't Act on Absent Elements
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
jQuery won't tell you if you're trying to run a whole lot of code on an empty

content/performance/dont-repeat-yourself.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Keep Things DRY
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
Don't repeat yourself; if you're repeating yourself, you're doing it wrong.

content/performance/event-delegation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Use Event Delegation
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
Event delegation allows you to bind an event handler to one container element

content/performance/optimize-selectors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Optimize Selectors
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
Selector optimization is less important than it used to be, as more browsers implement document.querySelectorAll() and the burden of selection shifts from jQuery to the browser. However, there are still some tips to keep in mind.

content/performance/read-the-source.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Don't Treat jQuery as a Black Box
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
Use the source as your documentation — bookmark

content/performance/use-stylesheets-for-changing-css.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Use Stylesheets for Changing CSS on Many Elements
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
If you're changing the CSS of more than 20 elements using `$.fn.css`, consider

content/performance/variable-definition.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ chapter : performance
33
section: 0
44
title: Variable Definition
55
attribution: jQuery Fundamentals
6+
tags: performance
67
---
78

89
Variables can be defined in one statement instead of several.

0 commit comments

Comments
 (0)