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.