diff options
author | Andrew Dolgov <[email protected]> | 2017-02-28 19:13:00 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-02-28 19:13:00 +0300 |
commit | 4eb861026b8aed148f411a307cf7c0a48d0d15f0 (patch) | |
tree | 30f417d394de785ed5d40bb7cfdee679cfc68d89 /js/offline.js | |
parent | c348dcdc5faca033272fb39d3cc36086a85a0704 (diff) |
add book description tooltips using qtip2
Diffstat (limited to 'js/offline.js')
-rw-r--r-- | js/offline.js | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/js/offline.js b/js/offline.js index 540fc60..b6c8a24 100644 --- a/js/offline.js +++ b/js/offline.js @@ -44,8 +44,6 @@ function populate_list() { if (query) query = query.toLowerCase(); - console.log(query); - var books = $("#books_container"); books.html(""); @@ -125,7 +123,25 @@ function populate_list() { var cell = $(cell); if (cover) { - cell.find("img").attr("src", cover); + cell.find("img").attr("src", cover).qtip({ + position: { + target: 'mouse', + adjust: { + mouse: false + } + }, + style: { + classes: 'qtip-light qtip-custom' + }, + show: { + delay: 1000 + }, + hide: 'unfocus mouseleave', + content: { + text: info.comment ? info.comment : "No description available", + title: info.title + } + }); cell.find(".series_link") .attr("title", info.series_name + " [" + info.series_index + "]") |