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.

            
              <nav class="page-group">
    <!-- toggler -->
    <button type="button" class="page-group__toggle visible-xsmall js-show-page-group-list">Contents</button>

    <ol class="page-group__list no-margin js-contents">
        <li class="page-group__item">
            <span class="page-group__text page-group__text--no-link">
                Apply for or renew a Blue Badge in Scotland
            </span>
        </li>
        <li class="page-group__item">
            <a data-gtm="guide-p1" class="page-group__text page-group__text--link" href="#">
                What is the Blue Badge scheme?
            </a>
        </li>
        <li class="page-group__item">
            <a data-gtm="guide-p2" class="page-group__text page-group__text--link" href="#">
                Eligibility – who can have one?
            </a>
        </li>
        <li class="page-group__item">
            <a data-gtm="guide-p3" class="page-group__text page-group__text--link" href="#">
                Using your Blue Badge
            </a>
        </li>
        <li class="page-group__item">
            <a data-gtm="guide-p4" class="page-group__text page-group__text--link" href="#">
                Misuse of badges
            </a>
        </li>
    </ol>

    <p class="page-group__location visible-xsmall">
        <small>
            Section <strong>1</strong> of 5
        </small>
    </p>
</nav>
            
          
!
            
              var classButtonOpen = 'page-group__toggle--open',
    classListExpanded = 'page-group__list--expanded',
    isMobile = $('.page-group__toggle').is(':visible');

function PageGroup() {
    this.button = $('.js-show-page-group-list');
    this.list = this.button.next('.page-group__list');
    var pgroup = this;

    this.button.on('click', function() {
        if ( $(this).hasClass(classButtonOpen) ) {
            pgroup.close();
        } else {
            pgroup.open();
        }
    });
}

PageGroup.prototype.open = function() {
    this.button.addClass(classButtonOpen);
    this.list.slideDown(200).addClass(classListExpanded);
};

PageGroup.prototype.close = function() {
    this.button.removeClass(classButtonOpen);
    this.list.slideUp(200).removeClass(classListExpanded);
};

new PageGroup();
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console