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="vid-1" class="show">
		<video src="" controls muted playsinline autoplay></video>
		<button class="next">Next</button>
	<div id="vid-2">
		<video src="" controls muted playsinline preload="none"></video>
		<button class="next">Next</button>
	<div id="vid-3">
		<video src="" controls muted playsinline reload="none"></video>
		<button class="next">Next</button>

	<script src='' integrity='sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==' crossorigin='anonymous'></script>
	<script src="js/main.js"></script>


                [id^="vid-"] {
  display: none;
  width: 400px;
  background: #eee;
  text-align: center;
  padding: 20px 0;

[id^="vid-"] video {
  width: 300px;

[id^="vid-"] button {
  background: pink;
  border: none;
  font-size: 20px;
  margin: 20px 30px;
  padding: 0.5em 2em;

[id^="vid-"] button:hover {
  cursor: pointer;

[id^="vid-"].show {
  display: block;
/*# */


                (function() {
    'use strict';

    let vids = $('video');//<video></video>
    let playBtns = $(''); //<button class="next"></button> (e) {
        let curVid = $(this).siblings('video').get(0);
        let next = $(this).parent().next(); //次の要素
        let nextVid = next.children('video').get(0); //次の要素内のvideoタグをDOMで取得

        curVid.pause();; //次の要素を表示
        $("html,body").animate({scrollTop:next.offset().top}); //次の要素へスクロール; //動画を再生