1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

Views -> Controllers, Moved previousLocationCfi logic to Reader, Bookmarks in Reader

This commit is contained in:
Fred Chasen 2014-01-02 20:32:51 -08:00
parent 3bfadb2abc
commit e4be17a428
24 changed files with 1363 additions and 1003 deletions

View file

@ -1,21 +0,0 @@
//-- http://stackoverflow.com/questions/2124684/jquery-how-click-anywhere-outside-of-the-div-the-div-fades-out
jQuery.fn.extend({
// Calls the handler function if the user has clicked outside the object (and not on any of the exceptions)
clickOutside: function(handler, exceptions) {
var $this = this;
jQuery(document).on("click.offer", function(event) {
if (exceptions && jQuery.inArray(event.target, exceptions) > -1) {
return;
} else if (jQuery.contains($this[0], event.target)) {
return;
} else {
jQuery(document).off("click.offer");
handler(event, $this);
}
});
return this;
}
});