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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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.

            
              -for(i=1; i<=5; i++)
  div(class="panel-wrap")
      
      h2(class="panel-head")
       a(href="javaScript:void(0)")='Title '+ i
          span(class="expend-icon")
            | +
      div(class="panel-description animated")
        | Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit aliquid incidunt neque officiis aspernatur, facere dolore molestiae velit fugit eos temporibus, iure maiores eaque natus corporis cum, officia adipisci optio? Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit aliquid incidunt neque officiis aspernatur, facere dolore molestiae velit fugit eos temporibus, iure maiores eaque natus corporis cum, officia adipisci optio?Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit aliquid incidunt neque officiis aspernatur, facere dolore molestiae velit fugit eos temporibus, iure maiores eaque natus corporis cum, officia adipisci optio? Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit aliquid incidunt neque officiis aspernatur, facere dolore molestiae velit fugit eos temporibus, iure maiores eaque natus corporis cum, officia adipisci optio?
            
          
!
            
              // --------- Variables
$font-stack1: 'Open Sans', sans-serif
$font-stack2: 'Montserrat', sans-serif

//---------- Page Style
body
  font-family: $font-stack1
  font-size: 14px
  background: #40485c

.panel-wrap
  background: #eac144
  margin-bottom: 10px
  .panel-description
    border: 1px solid #c5c5c5
    padding: 15px
    display: none
    background: #262b37
    color: #fff
  
.panel-head
  font-family: $font-stack2
  margin-bottom: 0px
  position: relative
  a
    display: block
    font-size: 16px
    letter-spacing: 0.05em
    text-decoration: none
    color: #262b37
    padding: 15px 15px
    text-transform: uppercase
    .expend-icon
      float: right
      font-size: 24px
      position: absolute
      right: 15px
      top: 50%
      transform: translateY(-50%)
      
    
  


            
          
!
            
              $(document).ready(function(){
  $('.panel-head').on('click', function(){
    
    var panelDescp = $(this).next();
    $('.panel-description').slideUp(250).removeClass('zoomInUp');
    
    $('.expend-icon').text('+');
    if(panelDescp.is(':hidden')){
      panelDescp.slideDown(250).addClass('zoomInUp');
      $(this).find('.expend-icon').text('-');
    }
    else{
      panelDescp.slideUp(250).removeClass('zoomInUp');
      $(this).find('.expend-icon').text('+');
    }
    
  });
}); 
            
          
!
999px
Loading ..................

Console