This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> | |
<link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> | |
<link href="http://pingendo.github.io/pingendo-bootstrap/themes/default/bootstrap.css" rel="stylesheet" type="text/css"> | |
</head><body> | |
<div> | |
<!-- Nav tabs --> | |
<ul class="nav nav-tabs" role="tablist"> | |
<li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a></li> | |
<li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li> | |
<li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li> | |
<li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li> | |
</ul> | |
<!-- Tab panes --> | |
<div class="tab-content"> | |
<div role="tabpanel" class="tab-pane active" id="home">Home</div> | |
<div role="tabpanel" class="tab-pane" id="profile">Profile</div> | |
<div role="tabpanel" class="tab-pane" id="messages">Messages</div> | |
<div role="tabpanel" class="tab-pane" id="settings">Settings</div> | |
</div> | |
</div> | |
<p> | |
* Links must be copy/pasted to address bar. Will not work clicking here.<br> | |
<a href="#home">Home Link From Outside</a><br> | |
<a href="#profile">Profile Link From Outside</a><br> | |
<a href="#mesages">Messages Link From Outside</a><br> | |
<a href="#settings">Settings Link From Outside</a> | |
</p> | |
<script> | |
var hash = window.location.hash; | |
hash && $('ul.nav a[href="' + hash + '"]').tab('show'); | |
$('.nav-tabs a').click(function (e) { | |
$(this).tab('show'); | |
var scrollmem = $('body').scrollTop(); | |
window.location.hash = this.hash; | |
$('html,body').scrollTop(scrollmem); | |
}); | |
</script> | |
</body></html> |