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
const $parallaxItems = $('[js-parallax]'); | |
const parallaxSpeed = -0.04; | |
if ($parallaxItems.length > 0) { | |
$parallaxItems.css('will-change', 'transform'); | |
window.addEventListener('scroll', function() { | |
$parallaxItems.css('transform', 'translateY( calc(' +(document.body.scrollTop || document.documentElement.scrollTop) * parallaxSpeed+ '* 1px ) )'); | |
}); | |
} | |
// Improvements: use request animation here: https://codepen.io/davatron5000/pen/YeyOxQ |
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
$(document).ready(function() { | |
var $field = $('[data-answer]'); | |
var appendValue = function(value) { | |
if ( $field.html().length < 20 ) { | |
$field.append(value); | |
} else { | |
alert('The number is too large!'); | |
} | |
}; |
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
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/SublimeLinter/Material-Theme-Darker-OceanicNext (SL).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
// "font_face": "Operator Mono", NEW! 2017!!! | |
"font_size": 16, | |
"highlight_line": false, | |
"ignored_packages": | |
[ |
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
Show hidden characters
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/User/SublimeLinter/Material-Theme-Darker-OceanicNext (SL).tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 16, | |
"ignored_packages": | |
[ | |
"SyncedSideBar", | |
"Vintage" |
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 items = document.querySelectorAll(".delete-button"); | |
for (var i = 0; i < items.length; i++) { | |
items[i].click(); | |
} |
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
// Requires visibility: hidden; on element assigned to | |
// 1s timing with ease is ideal | |
@keyframes fadeshake-in-out { | |
0% { | |
opacity: 0; | |
transform: scale3d(0.8, 0.8, 0.8); | |
visibility: visible; | |
} | |
10% { | |
transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); |
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 gulp = require('gulp'), | |
$ = require('gulp-load-plugins')(), // this is an arbitrary object that loads all gulp plugins in package.json. | |
path = require('path'), | |
browserSync = require('browser-sync'), | |
reload = browserSync.reload, | |
del = require('del'), | |
fs = require('fs'), | |
renderer = require("./renderer"), | |
gulpBowerFiles = require('gulp-bower-files'), | |
wiredep = require('wiredep').stream; |
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
<html> | |
<head> | |
<title></title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
//START |
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
// <a href="#somewhere">ASKFDJh</a> | |
$("a").bind("click", function(e){ | |
e.preventDefault(); | |
var location = $(this).attr("href") | |
$('html, body').animate({ | |
scrollTop: $(location).offset().top | |
}, 1500); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>test</title> | |
<link rel="stylesheet" href="style.css" /> | |
</head> | |
<body> |