1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00

Changed FP to EPUBJS for the entire project.

This commit is contained in:
RawKStar77 2013-06-04 18:23:11 -07:00
parent bc49465787
commit 9a94f151f9
33 changed files with 24764 additions and 0 deletions

21
epubjs/reader/utils.js Normal file
View file

@ -0,0 +1,21 @@
//-- 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;
}
});