*/
GetCoverFromIsbn: function() {
var bibkeys = [];
- $("div [id^=openlibrary-thumbnail]").each(function(i) {
+ $("[id^=openlibrary-thumbnail]").each(function(i) {
bibkeys.push("ISBN:" + $(this).attr("class")); // id=isbn
});
bibkeys = bibkeys.join(',');
for (id in booksInfo) {
var book = booksInfo[id];
var isbn = id.substring(5);
- $("."+isbn).each(function() {
+ $("[id^=openlibrary-thumbnail]."+isbn).each(function() {
var is_opacdetail = /openlibrary-thumbnail-preview/.exec($(this).attr("id"));
var a = document.createElement("a");
a.href = booksInfo.url;
var img = document.createElement("img");
if (is_opacdetail) {
img.src = book.cover.medium;
- $(this).append(img);
+ $(this).empty().append(img);
$(this).append('<div class="results_summary">' + '<a href="' + book.url + '">Preview</a></div>');
} else {
- img.src = book.cover.small;
+ img.src = book.cover.medium;
+ img.height = '110';
$(this).append(img);
}
} else {