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.


                <!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
<body class="px-5">
  <h2 class="mt-4 mb-4 text-dark font-weight-bold">Simple jQuery Slide Panel</h2>
  <a id="slide-button" class="menu-button btn mb-2" href="#"><i class="fas fa-map-marker-alt"></i> Menu</a>
   <div id="local-navbar" class="local-navbar card card-body">                
            <a href="#" class="close-icon"><i class="fas fa-caret-left"></i></a>
            <a href="#running-routes" class="local-navbar-icon"><i class="fas fa-map-marker-alt"></i> Running Routes</a>
            <a href="#group-runs" class="local-navbar-icon"><i class="fas fa-map-marker-alt"></i> Group Runs</a>
            <a href="#running-clubs" class="local-navbar-icon"><i class="fas fa-map-marker-alt"></i> Running Clubs</a>
            <a href="#swimming-pools" class="local-navbar-icon"><i class="fas fa-map-marker-alt"></i> Swimming Pools</a>


                .menu-button {
  background-color: #5661B3;
  color: #E6E8FF;

.menu-button:hover {
  color: #E6E8FF;
  background-color: #6574CD;

.local-navbar {
  background-color: #191E38;
  border-radius: 0 .25rem .25rem 0;
  display: flex;
  flex-direction: column;
  padding-left: 2rem;
  padding-right: 2rem;
  padding-top: 1.5rem;
  position: absolute;
  left: -350px;
  transition: all .24s ease-in;
  width: 250px;

.show {

.close-icon {
  line-height: 0;
  position: absolute;
  top: 0;
  right: 0;

.close-icon i {
  color: #B2B7FF;
  font-size: 2rem;

.close-icon i:hover {
  color: #E6E8FF;

.local-navbar-icon {
  background-color: #2F365F;
  border-radius: .125rem;
  color: #E6E8FF;
  margin-bottom: .5rem;
  padding: .75rem 1.25rem;
  text-decoration: none;

.local-navbar-icon:hover {
  background-color: #5661B3;
  color: #fff;
  text-decoration: none;


                // jQuery Version
jQuery(document).ready( function($) {
    $('#slide-button, .close-icon').click( function() {

// Vanilla JavaScript Version
// let menu_button = document.getElementById('slide-button');
// menu_button.addEventListener( 'click', show_menu);
// function show_menu() {
//     let menu_panel = document.getElementById('local-navbar');
//     if(menu_panel.classList.contains('show')) {
//         menu_panel.classList.remove('show');
//     } else {
//         menu_panel.classList.add('show');     
//     }
// }