Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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.


Auto Save

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.


                <div id="nav" class="nav">
  <a data-menuanchor="p1" class="menu__anchor" href="#p1"></a>
  <a data-menuanchor="p2" class="menu__anchor" href="#p2"></a>
  <a data-menuanchor="p3" class="menu__anchor" href="#p3"></a>

<div id='fullpage' class="fullpage">
  <div class='section pageOne active'>
    <h1 class="heading">Page One</h1>
  <div class='section pageTwo'>
    <h1 class="heading">Page Two</h1>
  <div class='section pageThree'>
    <h1 class="heading">Page Three</h1>



                @mixin center ($align-items, $justify-content, $flex-direction) {
  display: flex;
  align-items: $align-items;
  justify-content: $justify-content;
  flex-direction: $flex-direction;

body {
  user-select: none;
  margin: 0;

.section {
  height: 100vh;
  width: 100vw;
  @include center(center, center, row);

.menu__anchor {
  width: 16px;
  height: 16px;
  background: #dfdfdf;
  margin: 8px 0px 8px 0px;
  cursor: pointer;
  border-radius: 50%;
    0 2px 2px 0 rgba(0, 0, 0, 0.14), 
    0 1px 5px 0 rgba(0, 0, 0, 0.12), 
    0 3px 1px -2px rgba(0, 0, 0, 0.2);

.nav {
  z-index: 1;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  right: 40px;
  height: 300px;
  @include center(center, center, column);

.pageOne {
  background: grey;

.pageTwo {
  background: #191A1E;

.pageThree {
  background: grey;

.pageFour {
  background: #191A1E;

.pageFive {
  background: grey;

ul {
  list-style: none;

h1 {
  color: white;
  padding-left: 50px;



                // Grab pagination dots
var anchorLinks = $(".menu__anchor");
var clicked = false;

// Create animation for each element
var animations =;

function createAnimation(i, element) {
  var tween =, 0.34, {
    backgroundColor: "#241FF3"
  // Return a function to toggle the reversed state
  return function(target) {
    var reversed = element !== target ? true : !tween.reversed();

function playAnimation(event) {
  // Cycle through list of animations, toggling reversed state
  clicked = true;
  animations.each(function(i, animate) {


// reset clicked variable after first fake click
clicked = false;

// init fullpage
$(function() {
    licenseKey: "OPEN-SOURCE-GPLV3-LICENSE",
    scrollingSpeed: 1050,
    anchors: ["p1", "p2", "p3"],
    menu: "#nav",
    scrollOverflow: false,
    v2compatible: true,

    afterLoad: function(origin, destination) {
      var loadedSection = $(this);

    // On leave events
    onLeave: function(index, nextIndex, direction) {
      if (!clicked) {
        anchorLinks.eq(nextIndex - 1).click();
      clicked = false;