Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


	<link href=",900" rel="stylesheet"/>
	<link type='text/css' href="css/style.css" rel="stylesheet"/>

<h1><a href="#" data-src="">COUNT</a>.LY</h1>

<div id="counter">
<button id="minus">&nbsp;&nbsp;&ndash;&nbsp;&nbsp;</button>
<span id="count"></span>
<button id="plus">&nbsp;&nbsp;+&nbsp;&nbsp;</button>
<button id="clear">&nbsp;&nbsp;CLEAR&nbsp;&nbsp;</button>

<script type='text/x-handlebars-template' id='count-template'>
	<span class = "count">{{n}}</span>



                body {
	font-family: 'Work Sans', Helvetica, sans-serif;
	color: #333;
	text-align: center;
	background-color: #f9f9f9;

h1 {
 	font-weight: 900;
 	font-size: 4.5em;
 	letter-spacing: .12em

button {
	font-size: 2em;
	padding: 15px;
	font-weight: 900;
	background-color: #333;
	border: 2px solid;
	border-color: #333;
	color: white;
	text-transform: uppercase;
	margin: 30px 0px 70px 0px;


#count, .count {
	font-weight: 300;
	font-size: 9em;
	padding: 0px 50px 0px 50px;

#plus:hover {
	background-color: #47b8b2;
	border-color: #47b8b2;

#minus:hover {
	background-color: #f42727;
	border-color: #f42727;

#clear {
	font-weight: 300;
	margin-top: 20px;

#clear:hover {
	background-color: #bb8899;
	border-color: #bb8899;

a {
	text-decoration: none;
	color: #BB8899;

.red {
	color: #f42727;

.purple {
	color: #bb8899;



var n = 0;


window.onload = function() {
	// Add GifLinks to all anchor tags on the page!
    var element = document.querySelector( 'a' );
    GifLinks( element );

function render() {

$('#count').toggleClass('red', n > 100);
$('#count').toggleClass('purple', n < 0);


var source = $('#count-template').html();
var template = Handlebars.compile(source);


function setup() {
	//setup view

	//setup event listeners
	$('#counter').on('click', '#plus', increment);
	$('#counter').on('click', '#minus', decrement);
	$('#counter').on('click', '#clear', clear);

function increment() {

function decrement() {

function clear() {
	n = 0;