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
<!-- https://github.com/filamentgroup/loadCSS/blob/master/README.md --> | |
<link rel="preload" href="path/to/file.css" as="style" onload="this.rel='stylesheet'"> | |
<noscript><link rel="stylesheet" href="path/to/file.css"></noscript> | |
<!-- Full page example --> | |
<!DOCTYPE html> | |
<html class="no-js" lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
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
/*https://github.com/filamentgroup/loadCSS/blob/master/README.md*/ | |
/*! loadCSS: load a CSS file asynchronously. [c]2016 @scottjehl, Filament Group, Inc. Licensed MIT */ | |
!function(a){"use strict";var b=function(b,c,d){function j(a){return e.body?a():void setTimeout(function(){j(a)})}function l(){f.addEventListener&&f.removeEventListener("load",l),f.media=d||"all"}var g,e=a.document,f=e.createElement("link");if(c)g=c;else{var h=(e.body||e.getElementsByTagName("head")[0]).childNodes;g=h[h.length-1]}var i=e.styleSheets;f.rel="stylesheet",f.href=b,f.media="only x",j(function(){g.parentNode.insertBefore(f,c?g:g.nextSibling)});var k=function(a){for(var b=f.href,c=i.length;c--;)if(i[c].href===b)return a();setTimeout(function(){k(a)})};return f.addEventListener&&f.addEventListener("load",l),f.onloadcssdefined=k,k(l),f};"undefined"!=typeof exports?exports.loadCSS=b:a.loadCSS=b}("undefined"!=typeof global?global:this); | |
/*! CSS rel=preload polyfill. Depends on loadCSS function. [c]2016 @scottjehl, Filament Group, Inc. Li |
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
//http://stackoverflow.com/questions/25427017/increase-background-size-while-scrolling?answertab=active#tab-top | |
var x; | |
$(window).on('scroll', function() { | |
x = $(window).scrollTop(); | |
$('.size').css('background-size', 100 + parseInt(x / 50, 0) + '% '); | |
}); |
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
rel="noopener noreferrer" |
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
<!-- Vanilla JS --> | |
<script> | |
var timeOut; | |
function scrollToTop() { | |
if (document.body.scrollTop!==0 || document.documentElement.scrollTop!==0){ | |
window.scrollBy(0,-50); | |
timeOut=setTimeout('scrollToTop()',10); | |
} | |
else clearTimeout(timeOut); | |
} |
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
.selector { | |
background-clip: padding-box; | |
-moz-background-clip: padding; | |
-webkit-background-clip: padding; | |
} |
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
/* Begins with (^=) */ | |
div[class^="myPanel_"] {} | |
/* Ends With ($=) */ | |
div[id$="_myDiv"] {} | |
/* Contains (*=) */ | |
div[class*="logoutPanel"] {} | |
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
[ | |
//Indent code -- http://stackoverflow.com/questions/8839753/formatting-html-code-using-sublime-text-2 | |
{ "keys": ["ctrl+shift+r"], "command": "reindent" , "args": {"single_line": false}}, | |
{ "keys": ["ctrl+k", "ctrl+t"], "command": "title_case" }, | |
//Bring back the Quick Switch Project prompt | |
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" }, | |
//Save and Build HTML from Markdown at the same time | |
{ "keys": ["ctrl+s"], "command": "build" } | |
] |
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
@media screen and (-webkit-min-device-pixel-ratio: 0) { /* Insert CSS here */ } |