Google I/O Tabbed Navigation Using jQuery and CSS3

Google I/O Tabbed Nav uses jQuery and CSS3 to create a Material Design-style tabbed navigation with a beautiful wavy clicking effect as seen on the Google I/O website.

simple jquery tabs codepen, jquery tab slider with content, tabs with accordion jquery, vertical tabs jquery with animation, jquery horizontal tabs, jquery accessible tabs

How to make use of it:

1. Create tabbed navigation from the navigation menu.

<nav>
  <ul class="papertabs">
    <li>
      <a href="#" class="active">
        Agenda
        <span class="paperripple">
          <span class="circle"></span>
        </span>
      </a>
    </li>
    <li>
      <a href="#">
        Day 1
        <span class="paperripple">
          <span class="circle"></span>
        </span>
      </a>
    </li>
    <li>
      <a href="#">
        Day 2
        <span class="paperripple">
          <span class="circle"></span>
        </span>
      </a>
    </li>
      <li>
      <a href="#">
        My Schedule
        <span class="paperripple">
          <span class="circle"></span>
        </span>
      </a>
    </li>
  </ul>
</nav>

2. Basic CSS Styles for Tabbed Navigation.

* { box-sizing: border-box; }

nav {
  margin: 0 auto;
  display: table;
}

.papertabs {
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
  overflow: hidden;
 *zoom: 1;
}

.papertabs li { float: left; }

.papertabs a {
  color: inherit;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 16px 12px;
  line-height: 1;
  float: left;
  position: relative;
}

3. Create a bottom slider that moves while clicking on a tab menu.

#papertabs-line {
  background: #fff;
  position: absolute;
  height: 2px;
  bottom: 0;
}

4. Create a Material Design Click Effect.

.papertabs a.pressed .paperripple .circle {
  -moz-animation: ripple 0.25s ease-in;
  -webkit-animation: ripple 0.25s ease-in;
  animation: ripple 0.25s ease-in;
}

.papertabs a.focused .paperripple {
  background: rgba(255, 255, 255, 0.25);
  transition: none;
}

.paperripple {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0);
  -moz-transition: ease-in 0.4s;
  -o-transition: ease-in 0.4s;
  -webkit-transition: ease-in 0.4s;
  transition: ease-in 0.4s;
}

.paperripple .circle {
  position: absolute;
  width: 0;
  height: 0;
  top: 50%;
  left: 50%;
  background: rgba(255, 255, 255, 0);
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

@-moz-keyframes 
ripple {  0% {
 background: rgba(255, 255, 255, 0);
}
 25% {
 background: rgba(255, 255, 255, 0.55);
 width: 15%;
 padding-bottom: 15%;
}
 50% {
 background: rgba(255, 255, 255, 0.45);
 width: 85%;
 padding-bottom: 85%;
}
 100% {
 width: 200%;
 padding-bottom: 200%;
 background: rgba(255, 255, 255, 0.25);
}
}

@-webkit-keyframes 
ripple {  0% {
 background: rgba(255, 255, 255, 0);
}
 25% {
 background: rgba(255, 255, 255, 0.55);
 width: 15%;
 padding-bottom: 15%;
}
 50% {
 background: rgba(255, 255, 255, 0.45);
 width: 85%;
 padding-bottom: 85%;
}
 100% {
 width: 200%;
 padding-bottom: 200%;
 background: rgba(255, 255, 255, 0.25);
}
}

@keyframes 
ripple {  0% {
 background: rgba(255, 255, 255, 0);
}
 25% {
 background: rgba(255, 255, 255, 0.55);
 width: 15%;
 padding-bottom: 15%;
}
 50% {
 background: rgba(255, 255, 255, 0.45);
 width: 85%;
 padding-bottom: 85%;
}
 100% {
 width: 200%;
 padding-bottom: 200%;
 background: rgba(255, 255, 255, 0.25);
}
}

5. jQuery script to enable tabbed navigation.

$(function () {
    $('.papertabs').append('<li id=\'papertabs-line\'></li>');
    var $line = $('#papertabs-line');
    var $activeItem = $('.papertabs .active').parent();
    var $activeX = $('.papertabs .active').parent().position().left;
    $line.width($activeItem.width()).css('left', $activeX);
    $('.papertabs a').click(function (e) {
        var $el = $(this);
        var $offset = $el.offset();
        var $clickX = e.pageX - $offset.left;
        var $clickY = e.pageY - $offset.top;
        var $parentX = $el.parent().position().left;
        var $elWidth = $el.parent().width();
        e.preventDefault();
        $('.papertabs .active').removeClass('active');
        $el.addClass('pressed active');
        $el.find('.circle').css({
            left: $clickX + 'px',
            top: $clickY + 'px'
        });
        $line.animate({
            left: $parentX,
            width: $elWidth
        });
        $el.on('animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd', function () {
            $el.removeClass('pressed').addClass('focused');
            setTimeout(function () {
                $el.removeClass('focused');
            }, 800);
        });
    });
});

Google I/O Tabbed Nav Plugin/Github


See Demo And Download

Official Website(naashdev): Click Here

This superior jQuery/javascript plugin is developed by naashdev. For extra advanced usage, please go to the official website.

Related Posts

drag-drop-file-5x5-jq-uploader

Responsive Drag and Drop File Uploader/Download Plugin | 5x5_jq_uploader

5x5_jq_uploader plugin can be used to instantly create a drop file area and file queue with a little bit of preparation. Bootstrap is used for responsive planning…

Bootstrap-Dark-Mode

Stylesheet For Implementing Dark Mode with Bootstrap

Bootstrap Dark Mode provides a style sheet and two texts that allow you to implement Dark Mode on your website. Initially loaded based on user preferences, can…

responsive-navigation-menu

Multi-purpose Navigation Menu for Javascript Library | jQuery Corenav

coreNavigation is a multipurpose navigation menu for a jquery based javascript library, comes with more style, and is easy to integrate. 11 Default Menu 2 Responsive Navigation…

Simple-Multi-Select-Dropdown-Pure-Vanilla-Javascript

Simple Multi-Select Dropdown Pure Vanilla Javascript | multiSelect.js

MultiSelect.js is a simple, clean, and progressive JavaScript library designed for easy integration with any type of project or system. The design was heavily influenced by the…

Confetti-Falling-Animation-Effect-party

Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…

how-to-create-popup-in-html-with-css

How To Create A Popup in HTML with CSS

How to create popup in html with css – Popup without JavaScript is an elegant pop-up panel component with an animated scale, written in CSS. Have you…