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
.class { | |
background: rgba(255,255,255,0.8); | |
html.no-rgba & { | |
background: #eee; | |
} | |
} | |
/** Which would output as: **/ | |
.class { background: rgba(255,255,255,0.8); |
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
git config --global alias.ac '! git add -A && git commit -m' |
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> | |
<meta charset=utf-8> | |
<title>Brap.</title> | |
<style> | |
* { margin: 0; padding: 0; } | |
/** etc **/ | |
</style> | |
<body> | |
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
$('.toggler').bind('change', function() { | |
var showIt = !$(this).is(':checked'); | |
var panel = $(this).closest('.field').nextAll('.hide'); | |
panel.changeVisibility(showIt) | |
.closest('fieldset').changeClass('featured', showIt); | |
}); |
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
// Helper classes | |
$.fn.changeClass = function(className, add) { | |
add = add || false; | |
return this.each(function() { | |
if(add) { | |
$(this).addClass(className); | |
} | |
else { | |
$(this).removeClass(className); |
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
$('.toggler').change(function() { | |
var showIt = !$(this).is(':checked'); | |
var panel = $(this).closest('.field').nextAll('.hide'); | |
if(showIt) { | |
panel.show().closest('fieldset').addClass('featured'); | |
} | |
else { | |
panel.hide().closest('fieldset').removeClass('featured'); | |
} | |
}); |
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($) { | |
// Static constructs | |
$.motionlab = $.motionlab || {}; | |
$.motionlab.simpleScroll = { | |
conf: { | |
auto_slide: 0, | |
hover_pause: 0, | |
auto_slide_seconds: 1000 | |
} |
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
// add a "fire" variable, below the self variable, that will cover both the current instance and the root variable. | |
var self = this, | |
fire = root.add(self); | |
///////////////////////// | |
// then insert calls to the custom functions in all the necessary places, e.g. in the slide function -- | |
$.extend(self, { |
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
$('.carousel ul').each(function() { | |
var ul = $(this); | |
ul.simpleScroll({ | |
auto_slide: 1, | |
hover_pause: 1 | |
}); | |
// Aha! There's our data object we created inside the plugin. Luckily, this gives us access to everything that SimpleScroll had to offer. | |
var api = ul.data('simpleScroll'); |
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
$.fn.simpleScroll = function(conf) { | |
// already constructed --> return API (it shouldn't really be called for a second time.) | |
var el = this.data("simpleScroll"); | |
if (el) { return el; } | |
var conf = $.extend({}, $.motionlab.simpleScroll.conf, conf); | |
return this.each(function() { |