*/
GetCoverFromIsbn: function(newWindow) {
var bibkeys = [];
- $("div [id^=gbs-thumbnail]").each(function(i) {
+ $("[id^=gbs-thumbnail]").each(function(i) {
bibkeys.push($(this).attr("class")); // id=isbn
});
bibkeys = bibkeys.join(',');
}
for (id in booksInfo) {
var book = booksInfo[id];
- $("."+book.bib_key).each(function() {
+ $("[id^=gbs-thumbnail]."+book.bib_key).each(function() {
var a = document.createElement("a");
a.href = book.info_url;
if (typeof(book.thumbnail_url) != "undefined") {
var img = document.createElement("img");
img.src = book.thumbnail_url;
- $(this).append(img);
+ $(this).empty().append(img);
var re = /^gbs-thumbnail-preview/;
if ( re.exec($(this).attr("id")) ) {
$(this).append(
var message = document.createElement("span");
$(message).attr("class","no-image");
$(message).html(NO_GOOGLE_JACKET);
- $(this).append(message);
+ $(this).empty().append(message);
}
});
}
+
}
};