File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11var cache = { } ; //cache is available everywhere
2- var render = function ( book , bin ) {
3- var id = book . id ;
4- cache [ id ] = book ;
2+ var render = function ( book , container ) {
3+ // var id = book.id;
4+ // cache[id] = book;
55 var html =
6- '<div class="col-xs-12 col-sm-6 col-md-3 tile clearfix" >' +
6+ '<div class="col-xs-12 col-sm-6 col-md-3 tile clearfix">' +
77 '<a href="#" class="thumbnail">' +
88 '<img src="' + book . volumeInfo . imageLinks . smallThumbnail + '" alt="..." style="height: 130px; width: auto; overflow: hidden;">' +
99 '<p class="text-center title" style="font-size:10px; white-space: nowrap; overflow:hidden;"><strong>' + book . volumeInfo . title + '</strong></p>' +
1010 '<p class="text-center authors"style="font-size:10px; white-space: nowrap; overflow:hidden;">' + book . volumeInfo . authors [ 0 ] + '</p>' +
1111 '</a>' +
1212 '</div>' ;
1313
14- $ ( html ) . data ( "id" , id ) . appendTo ( bin ) ;
14+ $ ( html )
15+ . data ( "book" , book )
16+ . appendTo ( container ) ;
1517
1618}
1719var renderAll = function ( books , container ) { //calling a method
You can’t perform that action at this time.
0 commit comments