Vanilla Debounce esnextbin
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
$base-font-size: 16px; | |
/** | |
* Strips the unit from a given number-unit-combination and returns the number. | |
* @link: http://stackoverflow.com/a/12335841/1779999 | |
* @usage: parse-int(10px) => 10 | |
*/ | |
@function parse-int($number) { | |
@return $number / ($number * 0 + 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
//Constructor | |
var Person = function (name, age){ | |
//private properties | |
var priv = {}; | |
//Public properties | |
this.name = name; | |
this.age = age; | |
//Public methods |
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
var swipeFunc = { | |
touches : { | |
"touchstart": {"x":-1, "y":-1}, | |
"touchmove" : {"x":-1, "y":-1}, | |
"touchend" : false, | |
"direction" : "undetermined" | |
}, | |
touchHandler: function(event) { | |
var touch; | |
if (typeof event !== 'undefined'){ |
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 show_my_videos(data){ | |
html = ['<ul id="youtube-videos">']; | |
$(data.feed.entry).each(function(entry){ | |
url = this.link[0].href; | |
url_thumbnail = this.media$group.media$thumbnail[3].url; | |
description = this.media$group.media$description.$t; | |
html.push('<li><a href="'+url+'">'); | |
html.push('<img src="'+url_thumbnail+'" alt="'+description+'">'); | |
html.push('</a></li>'); | |
}); |