Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Navigation tooltips - fullPage.js</title>
- <meta name="author" content="Matthew Howell" />
- <meta name="description" content="fullPage continuous scrolling demo." />
- <meta name="keywords" content="fullpage,jquery,demo,scroll,loop,continuous" />
- <meta name="Resource-type" content="Document" />
- <link rel="stylesheet" type="text/css" href="../dist/fullpage.css" />
- <link rel="stylesheet" type="text/css" href="examples.css" />
- <style>
- .left-nav {
- display: flex;
- flex-direction: column;
- position: fixed;
- left: 30px;
- top: 50%;
- transform: translateY(-50%);
- z-index: 70;
- }
- .left-nav .nav-section {
- display: flex;
- align-items: center;
- font-size: 12px;
- color: #ffffffcc;
- }
- .left-nav .nav-section:hover {
- color: #ffffff;
- }
- .left-nav .nav-section .bullet-outline {
- padding: 3px;
- width: 13px;
- height: 13px;
- border-radius: 13px;
- margin-right: 10px;
- border: 1px solid #ffffff00;
- transition: all 0.2s;
- }
- .left-nav .nav-section.current .bullet-outline {
- border: 1px solid #ffffff;
- }
- .left-nav .nav-section .bullet {
- width: 100%;
- height: 100%;
- border-radius: 11px;
- border: 1px solid #ffffffcc;
- box-sizing: border-box;
- transition: all 0.2s;
- }
- .left-nav .nav-section:hover .bullet {
- border: 1px solid #ffffff;
- }
- .left-nav .nav-section.current .bullet {
- background-color: #ffffff;
- border: 1px solid #ffffff00;
- }
- .left-nav .divider {
- width: 1px;
- height: 40px;
- margin-left: 10px;
- background-color: #ffffff66;
- }
- </style>
- <!--[if IE]>
- <script type="text/javascript">
- var console = { log: function() {} };
- </script>
- <![endif]-->
- </head>
- <body>
- <ul id="menu">
- <li data-menuanchor="firstPage" class="active"><a href="#firstPage">First slide</a></li>
- <li data-menuanchor="secondPage"><a href="#secondPage">Second slide</a></li>
- <li data-menuanchor="3rdPage"><a href="#3rdPage">Third slide</a></li>
- </ul>
- <select id="demosMenu">
- <option selected>Choose Demo</option>
- <option id="jquery-adapter">jQuery adapter</option>
- <option id="active-slide">Active section and slide</option>
- <option id="auto-height">Auto height</option>
- <option id="autoplay-video-and-audio">Autoplay Video and Audio</option>
- <option id="backgrounds">Background images</option>
- <option id="backgrounds-fixed">Fixed fullscreen backgrounds</option>
- <option id="background-video">Background video</option>
- <option id="callbacks-v2-compatible">Callbacks version 2</option>
- <option id="callbacks-v3">Callbacks version 3</option>
- <option id="continuous-horizontal">Continuous horizontal</option>
- <option id="continuous-vertical">Continuous vertical</option>
- <option id="parallax">Parallax</option>
- <option id="css3">CSS3</option>
- <option id="drag-and-move">Drag And Move</option>
- <option id="easing">Easing</option>
- <option id="fading-effect">Fading Effect</option>
- <option id="fixed-headers">Fixed headers</option>
- <option id="gradient-backgrounds">Gradient backgrounds</option>
- <option id="interlocked-slides">Interlocked Slides</option>
- <option id="looping">Looping</option>
- <option id="methods">Methods</option>
- <option id="navigation-vertical">Vertical navigation dots</option>
- <option id="navigation-horizontal">Horizontal navigation dots</option>
- <option id="navigation-tooltips">Navigation tooltips</option>
- <option id="no-anchor">No anchor links</option>
- <option id="normal-scroll">Normal scrolling</option>
- <option id="normalScrollElements">Normal scroll elements</option>
- <option id="offset-sections">Offset sections</option>
- <option id="one-section">One single section</option>
- <option id="reset-sliders">Reset sliders</option>
- <option id="responsive-auto-height">Responsive Auto Height</option>
- <option id="responsive-height">Responsive Height</option>
- <option id="responsive-width">Responsive Width</option>
- <option id="responsive-slides">Responsive Slides</option>
- <option id="scrollBar">Scroll bar enabled</option>
- <option id="scroll-horizontally">Scroll horizontally</option>
- <option id="scrollOverflow">Scroll inside sections and slides</option>
- <option id="scrollOverflow-reset">ScrollOverflow Reset</option>
- <option id="lazy-load">Lazy load</option>
- <option id="scrolling-speed">Scrolling speed</option>
- <option id="trigger-animations">Trigger animations</option>
- <option id="vue-fullpage">Vue-fullpage component</option>
- </select>
- <div class="left-nav">
- <a class="nav-section" href="#firstPage">
- <div class="bullet-outline"><div class="bullet"></div></div>
- First slide
- </a>
- <div class="divider"></div>
- <a class="nav-section" href="#secondPage">
- <div class="bullet-outline"><div class="bullet"></div></div>
- Second slide
- </a>
- <div class="divider"></div>
- <a class="nav-section" href="#3rdPage">
- <div class="bullet-outline"><div class="bullet"></div></div>
- Third slide
- </a>
- </div>
- <div id="fullpage">
- <div class="section" id="section0">
- <div class="intro">
- <h1>Section 1</h1>
- <p>
- Use the `navigationTooltips` option to use a text for each of the bullets in the navigation element.
- </p>
- </div>
- </div>
- <div class="section" id="section1">
- <h1>Section 2</h1>
- </div>
- <div class="section" id="section2">
- <h1>Section 3</h1>
- </div>
- </div>
- <script type="text/javascript" src="../dist/fullpage.js"></script>
- <script type="text/javascript" src="examples.js"></script>
- <script type="text/javascript">
- var myFullpage = new fullpage('#fullpage', {
- sectionsColor: ['#1bbc9b', '#4BBFC3', '#7BAABE', 'whitesmoke', '#ccddff'],
- anchors: ['firstPage', 'secondPage', '3rdPage'],
- navigation:true,
- navigationTooltips: ['Page 1', 'Page 2', 'Any text!'],
- showActiveTooltip: true,
- menu: '#menu'
- });
- function updateCurrentPage() {
- var hash = location.hash || document.querySelector('.nav-section').getAttribute('href');
- const el = document.querySelector("a.nav-section[href='" + hash + "']");
- document.querySelectorAll('.nav-section').forEach(s => {
- s.classList.remove('current');
- });
- el.classList.add('current');
- }
- window.onhashchange = updateCurrentPage;
- updateCurrentPage();
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement