Skip to content

Commit

Permalink
Update 2012/2012-01-13-implementing-semantic-anti-templating-with-jqu…
Browse files Browse the repository at this point in the history
…ery.md
  • Loading branch information
Jarno Keskikangas committed Jan 14, 2012
1 parent 31280fa commit 8c2fb7c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ I started with a modest goal: Given I have a static web page
```html
<div class="container">
<div class="hello"></div>
<div class="goodbye"></div>
</div>
```

Expand All @@ -45,6 +46,7 @@ and a simple JavaScript object
```javascript
data = {
hello: "Hi There!"
goodbye: "See ya!"
};
```

Expand All @@ -55,6 +57,7 @@ following in the browser
```html
<div class="container">
<div class="hello">Hi There!</div>
<div class="goodbye">See ya!</div>
</div>
```

Expand All @@ -78,7 +81,7 @@ jQuery.fn.render = (data) ->
node.append children
```

## There are too many loops out there
## Getting rid of loops

The next logical step was support for collections. I wanted to keep the interface exactly the same, without explicit
loops or partials. Given an object like
Expand Down

0 comments on commit 8c2fb7c

Please sign in to comment.