From 59403644ae38e9e54d8099b2e1f1a2651e6639e6 Mon Sep 17 00:00:00 2001 From: Usman Khalid Date: Fri, 27 Sep 2013 21:35:16 +0500 Subject: [PATCH] Moved jquery event handling to parent since hidden elements do not get events attached --- common/static/js/pdfviewer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/static/js/pdfviewer.js b/common/static/js/pdfviewer.js index a76e2f397c..3424a09892 100755 --- a/common/static/js/pdfviewer.js +++ b/common/static/js/pdfviewer.js @@ -327,11 +327,11 @@ PDFJS.disableWorker = true; loadUrl(chapterUrl, pageVal); } - $("#previous").click(function(event) { + $(".last").on('click','#previous',function(){ prevPage(); }); - $("#next").click(function(event) { + $(".next").on('click','#next',function(){ nextPage(); });