The simplest Tab system ever using jQuery. It can be used with keyboard as well. SCSS for the CSS. Don't forget to include jQuery.
See the Pen here by Ricardo Zea on CodePen.
window.scrollTo({top: 0, behavior: "smooth"}); |
The simplest Tab system ever using jQuery. It can be used with keyboard as well. SCSS for the CSS. Don't forget to include jQuery.
See the Pen here by Ricardo Zea on CodePen.
// Hardware cfg - Generated by QUAKE LIVE. Do not modify | |
unaliasall | |
seta zmq_rcon_password "" | |
seta zmq_stats_password "" | |
seta net_socksPassword "" | |
seta net_socksUsername "" | |
seta net_socksPort "1080" | |
seta net_socksServer "" | |
seta net_socksEnabled "0" | |
seta net_noudp "0" |
.flyout { | |
display: none; | |
width: 200px; | |
height: 200px; | |
margin: 1em; | |
padding: 20px; | |
position: relative; | |
background: #ccc; | |
} |
<label class="show-password"><input type="checkbox" onclick="showPass()">Show password</label> |
/* | |
Script to display the viewport size when working on responsive stuff. | |
Adpted to vanilla JS by: Taylor Hunt - https://codepen.io/tigt/ | |
*/ | |
var el = document.createElement("output"); | |
document.body.append(el); | |
Object.assign(el.style, { | |
position: "fixed", | |
bottom: 0, | |
left: 0, |
<noscript id="deferred-styles"> | |
<link href="https://fonts.googleapis.com/css?family=Ubuntu:300,300i,700,700i" rel="stylesheet"> | |
</noscript> | |
<script> | |
// Load CSS | |
var loadDeferredStyles = function() { | |
var addStylesNode = document.getElementById("deferred-styles"); | |
var replacement = document.createElement("div"); | |
replacement.innerHTML = addStylesNode.textContent; | |
document.body.appendChild(replacement) |
//**MINIMAL PAGE TRANSITIONS WITH JQUERY & CSS | |
//https://blog.adam-marsden.co.uk/minimal-page-transitions-with-jquery-css-d97f692d5292 | |
$(function() { | |
$("a").each(function() { /* [1] */ | |
if ( location.hostname === this.hostname || !this.hostname.length ) { /* [1] */ | |
var link = $(this).attr("href"); /* [2] */ | |
if ( link.match("^#") ) { /* [3] */ | |
$(this).click(function() { | |
var target = $(link); /* [4] */ |
//Animated gradient background | |
//https://medium.com/@dave_lunny/animating-css-gradients-using-only-css-d2fd7671e759 | |
//Usage: | |
//Example 1: include gradientAnimation(red, blue, .6s); | |
//Example 2: include gradientAnimation(lighten($orange, 10), $orange, .6s); | |
@mixin gradientAnimation( $start, $end, $transTime ){ | |
background-size: 100%; | |
background-image: linear-gradient($start, $end); |
//**SCROLL TO TOP | |
$("footer").append("<hr><a href='#' class='scroll-up'>Back to Top ↑</a>"); | |
$(".scroll-up").on("click", function(e) { | |
e.preventDefault(); | |
$("html, body").animate({ scrollTop: 0 }, 720); //the last value is the speed | |
}); |