cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

              <div class="accordion">
	<h4 class="accordion-toggle active"> This is an accordion <i class="fa fa-chevron-down"></i></h4>
	<div class="accordion-content default ">
		<p>TThis is a simple accordion implementation, that's uses minimal markup and roughly 8 lines of jQuery.  It can be easily hacked to use different behavior.  Chevrons are font awesome but easily replaced with anything.
	<h4 class="accordion-toggle ">Another Tab <i class="fa fa-chevron-down"></i></h4>
	<div class="accordion-content">
		<p>This is a play on an ultra lightweight accordion menu.</p>

	<h4 class="accordion-toggle">News Releases <i class="fa fa-chevron-down"></i></h4>
	<div class="accordion-content" >
		<p>Vivamus facilisisnibh scelerisque laoreet.</p>
              //Used on contact page
$orange: #f8580a;
.accordion {
	background-color: $orange;
	margin-top: 20px;
	i {
		position: absolute;
		right: 10px;
		&:before {

			display: inline-block;
			-ms-transform-origin: 50% 35%;
			-webkit-transform-origin: 50% 35%;
			-moz-transform-origin: 50% 35%;
			transform-origin: 50% 35%;
			-webkit-transition-timing-function: ease-in-out; /* Safari and Chrome */
			transition-timing-function: ease-in-out;
			-webkit-transform-style: preserve-3d;
			-moz-transform-style: preserve-3d;
			transform-style: preserve-3d;
			-webkit-transition: all 0.3s;
			-moz-transition: all 0.3s;
			transition: all 0.3s;
			 transform: rotateZ(0deg);
			 transform-origin: 50% 50%;
			-moz-transform: rotateZ(0deg);
			-webkit-transform: rotateZ(0deg);
			-o-transform: rotateZ(0deg);
			-ms-transform: rotateZ(0deg);
	h4 {
		color: white;
		position: relative;
		background-color: $orange;
		padding: 10px;
		border-bottom: 1px solid #444;
		line-height: 1em;
		font-size: 16px;
		text-transform: uppercase;
		&:hover {
			background-color: lighten($orange, 20%)
	h4.active {
		background-color: $orange;
		i:before {
			 transform: rotateZ(180deg);
            -moz-transform: rotateZ(180deg);
            -webkit-transform: rotateZ(180deg);
            -o-transform: rotateZ(180deg);
            -ms-transform: rotateZ(180deg);

.accordion-toggle {
	cursor: pointer;

.accordion-content {
	padding: 14px;
	display: none;
	background-color: white;
	&.default {
		display: block;
body {
	background: #444;
              (function(jQuery) {
	"use strict";
	var Engine;
	jQuery(document).ready(function() {
		Engine = {
			ui: {
				accordion: function() {

					   Accordion functionality f

					$('.accordion').find('.accordion-toggle').click(function() {
						//Expand or collapse this panel
						if (!$(this).hasClass("active")) {
							$('.accordion h4').removeClass('active');
						} else {
							$('.accordion h4').removeClass('active');

			} // ui
		}; // Engine
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................