Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Paginator"
Bootstrap 3.0.0 Snippet by
novadevco
3.0.0
jQuery
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
3.0K
 
1 Fav
Post to Facebook
Tweet this
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="paginator"> <ul class="pager"> <li class="previous"> <a>Previous</a> </li> <li > <h3 class="fillSpace">Title goes here</h3> </li> <li class="next"> <a>Next</a> </li> </ul> </div> <div> <section class="navSelected NavigationItem" title="Title 1">Section 1</section> <section class="NavigationItem" title="Title 2">Section 2</section> <section class="NavigationItem" title="Title 3">Section 3</section> <section class="NavigationItem" title="Title 4">Section 4</section> <section class="NavigationItem" title="Title 5">Section 5</section> </div> <!-- <a class="prev">Prev</a> <a class="next">Sig</a>-->
.NavigationItem{display:none;} .navSelected { color:red; display: block; } .next, .previous{ cursor:pointer; -webkit-touch-callout: none; /* iOS Safari */ -webkit-user-select: none; /* Safari */ -khtml-user-select: none; /* Konqueror HTML */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* Internet Explorer/Edge */ user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */ } .fillSpace { display:inline-block; padding:0;margin:0; } .paginator { padding: 15px; }
$(function () { //next changeText($('section.navSelected')); $('.next').click(function() { var $el = $('section.navSelected').removeClass('navSelected'); var $next = $el.next(); console.log($next.find('.NavigationItem')); if ($next.length === 0) $next = $('section:first'); changeText($next); $next.addClass('navSelected'); }); //prev $('.previous').click(function() { var $el = $('section.navSelected').removeClass('navSelected'); var $next = $el.prev(); console.log($next.length); if ($next.length === 0) $next = $('section:last'); changeText($next); $next.addClass('navSelected'); }); function changeText(sectSel){ var title = $( sectSel ).attr( "title" ); $('.fillSpace').empty(); $('.fillSpace').append(title); } });
Related:
See More
Free Template
Light Bootstrap Dashboard Angular
81.8K
81
Responsive Date Paginator
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76