Skip to content

Instantly share code, notes, and snippets.

@ahirschberg
Created March 3, 2015 20:03
bookListItem = $('<li book-id=' + id + '><a href="book.html"><h2>' + title + '</h2><p>' + realText + '</p></a></li>');
bookListItem.click(function(){
book_id = $(this).attr("book-id");
localStorage.setItem("id", book_id);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment