hiro3 hiro3

View JS: Detect size and scroll
1 2 3 4 5 6 7 8 9
var root = (document.compatMode === "BackCompat") ? document.body : document.documentElement;
console.log([
root.clientHeight,//height of the visible area
root.clientWidth,//width of the visible area
root.scrollHeight,//document height including hidden(scroll) area
root.scrollWidth,//document width including hidden(scroll) area
window.pageYOffset || root.scrollTop,
window.pageXOffset || root.scrollLeft,
]);
View gist:3682327
1 2 3 4 5 6 7 8 9 10
#point {
position:absolute;
width:8px;
height:8px;
margin:-4px 0 0 -4px;
background:-webkit-gradient(linear,left top,left bottom,from(#FFACCB),color-stop(0.5,#FF73A7),to(#FF5E99));
border-radius:4px;
box-shadow:0 2px 3px #333
}
#point.hop {
View gist:2056865
1 2 3 4 5 6 7 8 9 10
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
Something went wrong with that request. Please try again.