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
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, | |
]); |
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
#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 { |
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
// ---------------------------------------------------------- | |
// 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) {} |