Last active
August 29, 2015 14:26
-
-
Save ahirschberg/e0ac529508c6302e5e1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// try 2 | |
// indentation looks better, but now the style is inconsistent: | |
books.forEach(function (book) { | |
$('<li/>').html( // statement.method(... here | |
$('<a>') // statement[\n].method(...) here | |
.attr('href', 'book.html') | |
.append( | |
$('<h2/>').text(book.title) | |
) | |
).click(function () { | |
do_something(book); | |
}).appendTo('#book-list'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment