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
//------------------------------------------ | |
// Breakpoints and media queries mixin | |
//------------------------------------------ | |
// | |
// Usage: | |
//------------------------------------------ | |
// | |
// @include breakpoint($breakpoint, $query1) { | |
// /* Styles */ | |
// } |
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() { | |
var $el = $('.sticky-layer'); | |
var $window = $(window); | |
$window.bind("scroll resize", function() { | |
var elHeight = $el.outerHeight(); | |
var windowHeight = $window.height(); | |
var scrolledHeight = $window.scrollTop(); | |
if ((windowHeight + scrolledHeight) > elHeight ){ |
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(){ | |
$('.js-show').click(function(){ | |
var id = $(this).attr('id'); | |
var el = $('.' + id); | |
if ($(this).hasClass('open')){ | |
el.animate({height: '46px'}, 600); | |
} | |
else{ |
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
npm install --save-dev --no-bin-link gulp |
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
<h1>Make all div clickable with CSS <span>using absolute positioning</span></h2> | |
<div> | |
<a href="https://github.com/JoanClaret/" title="Github link">Github link</a> | |
<h2>Joan's Github</h2> | |
<p>Mixtape blog readymade, pork belly DIY sriracha hoodie. Cred gentrify freegan, swag DIY 90's tilde tousled listicle Thundercats. Seitan taxidermy Helvetica Blue Bottle, slow-carb Tumblr letterpress ugh plaid Thundercats mlkshk. | |
</p> | |
</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
var $swipeable = $$('nav'); | |
var first = true; | |
var locked = false; | |
var direction; | |
$swipeable.swipe(function(e) { | |
// after swipe, reinitialize control variables | |
first = true; |
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 linkcolor = (function(selector, $){ | |
$(selector).click(function(e){ | |
// console.log($(this)); // display target element | |
// console.log(e); // display event information | |
// console.log(e.clientX); // display event property value | |
// console.log(e.target); // display event property value | |
if ($(this).hasClass('active')){ |
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
// define components function | |
var components = (function($$) { | |
// define linkcolor function in components context | |
var linkColor = function(selector){ | |
$(selector).click(function(e){ | |
if ($$(this).hasClass('link-blue')){ | |
console.log($$(this).attr('title')); |
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
"use strict"; | |
var myClosure = (function outerFunction() { | |
var hidden = 1; | |
return { | |
inc: function innerFunction() { | |
return hidden++; | |
} |
OlderNewer