1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-26 00:29:47 +02:00

build assets

This commit is contained in:
Harvey Kandola 2017-03-10 12:12:51 +00:00
parent 67866a54b3
commit c5b80071f1
3 changed files with 1659 additions and 1812 deletions

View file

@ -6,6 +6,7 @@
"-Promise", "-Promise",
"moment", "moment",
"$", "$",
"jQuery",
"_", "_",
"is", "is",
"Mousetrap", "Mousetrap",

View file

@ -10,22 +10,19 @@
// https://documize.com // https://documize.com
$.fn.inView = function(){ $.fn.inView = function(){
let win = $(window); var win = $(window);
let obj = $(this); var obj = $(this);
// trap for no object // trap for no object
if (obj.length === 0) { if (obj.length === 0) {
return false; return false;
} }
// the top Scroll Position in the page var scrollPosition = win.scrollTop();
let scrollPosition = win.scrollTop();
// the end of the visible area in the page, starting from the scroll position var visibleArea = win.scrollTop() + win.height();
let visibleArea = win.scrollTop() + win.height();
// we check to see if the start of object is in view var objPos = obj.offset().top;// + obj.outerHeight();
let objPos = obj.offset().top;// + obj.outerHeight();
return(visibleArea >= objPos && scrollPosition <= objPos ? true : false); return(visibleArea >= objPos && scrollPosition <= objPos ? true : false);
}; };

File diff suppressed because one or more lines are too long