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
<link rel="stylesheet" media="all and (orientation:portrait)" href="portrait.css"> | |
<link rel="stylesheet" media="all and (orientation:landscape)" href="landscape.css"> | |
<h1 id="portrait">You're Viewing in Portrait Mode</h1> | |
<h1 id="landscape">You're Viewing in Landscape</h1> | |
#landscape {display:none} | |
landscape.css: #landscape {display:none} | |
portrait.css: #landscape {display:none} |
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
{ | |
"auto_complete": false, | |
"caret_style": "phase", | |
"close_windows_when_empty": false, | |
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme", | |
"draw_white_space": "all", | |
"find_selected_text": true, | |
"fold_buttons": false, | |
"folder_exclude_patterns": | |
[ |
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
img:hover { | |
-webkit-filter: grayscale(0%); | |
-webkit-transition: .5s ease-in-out; | |
-moz-filter: grayscale(0%); | |
-moz-transition: .5s ease-in-out; | |
-o-filter: grayscale(0%); | |
-o-transition: .5s ease-in-out; | |
} | |
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
#resize-image { | |
/* Just imagine that the image_1.png is 200x400px */ | |
background:url(image_1.png) top left no-repeat; | |
-moz-background-size: 100px 200px; | |
-o-background-size: 100px 200px; | |
-webkit-background-size: 100px 200px; | |
} |
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
@font-face { | |
font-family: 'MyFontFamily'; | |
src: url('myfont-webfont.eot?') format('eot'), | |
url('myfont-webfont.woff') format('woff'), | |
url('myfont-webfont.ttf') format('truetype'), | |
url('myfont-webfont.svg#svgFontName') format('svg'); | |
} |
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
img.flip { | |
-moz-transform: scaleX(-1); | |
-o-transform: scaleX(-1); | |
-webkit-transform: scaleX(-1); | |
transform: scaleX(-1); | |
filter: FlipH; | |
-ms-filter: "FlipH"; | |
} |
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
// Back To Top | |
$('a.top').click(function(){ | |
$(document.body).animate({scrollTop : 0},800); | |
return false; | |
}); | |
//Create an anchor tag | |
<a class=”top” href=”#”>Back to top</a> |
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
$(‘img’).load(function() { | |
console.log(‘image load successful’); | |
}); |
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
$('li:odd').css('background', '#E8E8E8’); |
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 scrollSomething($sidebar, $window, topPadding){ | |
var offset = $sidebar.offset(); | |
$window.scroll(function() { | |
if ($window.scrollTop() > offset.top) { | |
$sidebar.stop().animate({ | |
marginTop: $window.scrollTop() - offset.top + topPadding | |
}, {duration: 700, easing: 'easeOutCubic'}); | |
} else { | |
$sidebar.stop().animate({ | |
marginTop: 0 |
OlderNewer