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 $selector = $('div'); | |
$selector.data('oHeight',$selector.height()).css('height','auto').data('nHeight',$selector.height()).height($selector.data('oHeight')).animate({height: $selector.data('nHeight')},400); |
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 top(string, num) { | |
var words = string.toLowerCase().split(/[\s,.]+/), | |
count = {}, | |
topWords = []; | |
for(var i=0; i<words.length;i++){ | |
(count[words[i]] !== undefined) ? count[words[i]]++ : count[words[i]] = 1; | |
} | |
var list = Object.keys(count).sort(function(a, b){return count[a]-count[b];}).reverse(); |
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
figure { | |
box-shadow: 0 18px 5px -18px rgba(0,0,0,.7), 0 12px 8px -12px rgba(0,0,0,.5); | |
margin: 0 auto; | |
overflow: hidden; | |
padding-bottom: 10px; | |
position: relative; | |
width: 300px; | |
} | |
figure img { |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
body { | |
font: bold 15px/1.1 Helvetica; | |
text-align: center; | |
} | |
div { |
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
for(var i=0;i<10;i++){ | |
(function(i){ | |
setTimeout(function(){console.warn(i)},i*1000); | |
})(i); | |
} |
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
// Original script: http://www.jeffreyharrell.com/blog/2010/11/creating-a-shake-event-in-mobile-safari/ | |
// Thanks to Ben Allman's write-up of jQuery Special Events: http://benalman.com/news/2010/03/jquery-special-events/ | |
// jQuery shake event by Tim Hettler | |
(function ($) { | |
$.event.special.shake = { | |
setup: function ( data, namespaces ) { |
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
figure { | |
box-shadow: 0 18px 5px -18px rgba(0,0,0,.7), 0 12px 8px -12px rgba(0,0,0,.5); | |
margin: 0 auto; | |
overflow: hidden; | |
padding-bottom: 10px; | |
position: relative; | |
width: 300px; | |
} | |
figure img { |
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
Prism.languages.scss = { | |
'comment': { | |
pattern: /(^|[^\\])(\/\*[\w\W]*?\*\/|\/\/.*?(\r?\n|$))/g, | |
lookbehind: true | |
}, | |
'keyword': { | |
pattern: /(\s)(if|in|from|through|and|or|not)(?=\s)/i, | |
lookbehind: true, | |
}, | |
'boolean': /\b(true|false)\b/g, |
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 interactionType = { | |
click: (Modernizr.touch) ? 'touchend' : 'click', | |
down: (Modernizr.touch) ? 'touchstart' : 'mousedown', | |
up: (Modernizr.touch) ? 'touchend' : 'mouseup', | |
enter: (Modernizr.touch) ? 'touchstart' : 'mouseenter', | |
leave: (Modernizr.touch) ? 'touchend' : 'mouseleave', | |
over: (Modernizr.touch) ? 'touchstart' : 'mouseover', | |
out: (Modernizr.touch) ? 'touchend' : 'mouseout', | |
move: (Modernizr.touch) ? 'touchmove' : 'mousemove' | |
}; |
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
// --- | |
// Sass (v3.2.9) | |
// --- | |
%placeholder { | |
color: red; | |
} | |
%placeholder { |
OlderNewer