This file contains 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 ipinfo(cb, ip) { | |
var request; | |
if (window.XMLHttpRequest) { // Mozilla, Safari, ... | |
request = new XMLHttpRequest(); | |
} else if (window.ActiveXObject) { // IE | |
try { | |
request = new ActiveXObject('Msxml2.XMLHTTP'); | |
} catch (e) { | |
try { | |
request = new ActiveXObject('Microsoft.XMLHTTP'); |
This file contains 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() { |