From 36075d3f6a1c5785f8ffe959b2a86421f3673d24 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 6 Jun 2017 13:36:17 +0300 Subject: popup dictionary window on touch events --- js/read.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'js/read.js') diff --git a/js/read.js b/js/read.js index 0f83583..9ca4515 100644 --- a/js/read.js +++ b/js/read.js @@ -205,3 +205,17 @@ function search() { function toggle_transitions(elem) { localforage.setItem("epube.disable-transitions", elem.checked); } + +function dict_lookup(word, callback) { + $.post("backend.php", {op: 'define', word: word}, function(data) { + if (data) { + + $(".dict_result").html(data.result.join("
")); + $("#dict-modal").modal('show'); + + if (callback) callback(); + } + }); +} + + -- cgit v1.2.3