Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <div id="fullpage">
    <div class="section">One<p>Just add the class "skip" to the section you want to skip. And make sure to use to add the function "skipPages" on your script as well as the call to it on the "onLeave" callback.</div>
    <div class="section skip">
        <div class="slide" data-anchor="slide1">Two 1</div>
        <div class="slide" data-anchor="slide2">Two 2 up<div style="height:1500px;"></div>Two 2 bottom</div>
      <div class="slide bg" data-anchor="slide3">Two 3<div style="height:1500px;"></div>Two 3 bottom</div>
    </div>
    <div class="section">Three<div style="height:1500px;"></div></div>
    <div class="section">Four</div>
</div>
              
            
!

CSS

              
                .section {
  text-align:center;
  font-size: 3em;
}

.bg:before {content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  background-image: url(https://www.meceware.com/wp-content/uploads/2016/11/bg1.jpg);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  opacity: 1;
}

p{
  font-size: 19px;
  max-width: 500px;
  margin: 0 auto;
}
              
            
!

JS

              
                new fullpage('#fullpage', {
    licenseKey: 'YOUR KEY HERE',
    sectionsColor: ['yellow', 'orange', '#C0C0C0', '#ADD8E6'],

    //events
    onLeave: function(origin, destination, direction) {
    	skipPages(origin, destination, direction)
    }
});


function skipPages(origin, destination, direction){
    if(destination.item.classList.contains('skip')){
        if(direction === 'down'){
            destinationIndex = destination.index + 2;
        }else{
            destinationIndex = destination.index;
        }
        console.log(destinationIndex);

        setTimeout(function(){
            fullpage_api.moveTo(destinationIndex);
        });
    }
}

              
            
!
999px

Console