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
http://h2ham.net/youtube-responsive | |
.youtube { | |
position: relative; | |
width: 100%; | |
padding-top: 56.25%; // it is aspect ratio. padding respect to the width | |
iframe { | |
position: absolute; | |
top: 0; | |
left: 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
// http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links | |
function scrollableElement(els) { | |
for(var i = 0, len = arguments.length; i < len; i++) { | |
var el = arguments[i], | |
$scrollElement = $(el); | |
if($scrollElement.scrollTop() > 0) { | |
return el; | |
} else { | |
$scrollElement.scrollTop(1); |
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
/** | |
* inspired by jdduke (http://jsbin.com/qofuwa/2/edit) | |
*/ | |
var preventPullToRefresh = (function preventPullToRefresh(lastTouchY) { | |
lastTouchY = lastTouchY || 0; | |
var maybePrevent = false; |
NewerOlder