This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function(){if(!Array.from){var r=document.createElement("script");r.src="/arquivos/arrayFrom.js",document.querySelector("head").appendChild(r)}}(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Vanilla Version */ | |
var Onviewport = function(el, elClass, offset, callback) { | |
var els = document.querySelectorAll(el), | |
top, | |
this_top, | |
height; | |
if(!offset) { var offset = 0; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
From: https://gist.github.com/paulirish/1579671 | |
MIT license | |
*/ | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head></head> | |
<body> | |
<!-- Check for Zepto support, load jQuery if necessary | |
From: http://zurb.com/article/1180/how-to-use-foundation-4-s-faster-better-a --> | |
<script> | |
document.write('<script src=/js/vendor/' | |
+ ('__proto__' in {} ? 'zepto' : 'jquery') | |
+ '.js><\/script>'); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onViewport(el, elClass, offset, callback) { | |
/*** Based on http://ejohn.org/blog/learning-from-twitter/ ***/ | |
var didScroll = false; | |
var this_top; | |
var height; | |
var top; | |
if(!offset) { var offset = 0; } | |
$(window).scroll(function() { |