Skip to content

Commit

Permalink
js/jquery: Allow non-tab links in the sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Nov 1, 2016
1 parent 7956c0a commit 3905461
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/gmaps.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<li><a href="#home" role="tab"><i class="fa fa-bars"></i></a></li>
<li><a href="#profile" role="tab"><i class="fa fa-user"></i></a></li>
<li class="disabled"><a href="#messages" role="tab"><i class="fa fa-envelope"></i></a></li>
<li><a href="https://github.com/Turbo87/sidebar-v2" role="tab" target="_blank"><i class="fa fa-github"></i></a></li>
</ul>

<ul role="tablist">
Expand Down
1 change: 1 addition & 0 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<li><a href="#home" role="tab"><i class="fa fa-bars"></i></a></li>
<li><a href="#profile" role="tab"><i class="fa fa-user"></i></a></li>
<li class="disabled"><a href="#messages" role="tab"><i class="fa fa-envelope"></i></a></li>
<li><a href="https://github.com/Turbo87/sidebar-v2" role="tab" target="_blank"><i class="fa fa-github"></i></a></li>
</ul>

<ul role="tablist">
Expand Down
1 change: 1 addition & 0 deletions examples/ol2.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<li><a href="#home" role="tab"><i class="fa fa-bars"></i></a></li>
<li><a href="#profile" role="tab"><i class="fa fa-user"></i></a></li>
<li class="disabled"><a href="#messages" role="tab"><i class="fa fa-envelope"></i></a></li>
<li><a href="https://github.com/Turbo87/sidebar-v2" role="tab" target="_blank"><i class="fa fa-github"></i></a></li>
</ul>

<ul role="tablist">
Expand Down
1 change: 1 addition & 0 deletions examples/ol3-no-jquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<li><a href="#home" role="tab"><i class="fa fa-bars"></i></a></li>
<li><a href="#profile" role="tab"><i class="fa fa-user"></i></a></li>
<li class="disabled"><a href="#messages" role="tab"><i class="fa fa-envelope"></i></a></li>
<li><a href="https://github.com/Turbo87/sidebar-v2" role="tab" target="_blank"><i class="fa fa-github"></i></a></li>
</ul>

<ul role="tablist">
Expand Down
1 change: 1 addition & 0 deletions examples/ol3.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<li><a href="#home" role="tab"><i class="fa fa-bars"></i></a></li>
<li><a href="#profile" role="tab"><i class="fa fa-user"></i></a></li>
<li class="disabled"><a href="#messages" role="tab"><i class="fa fa-envelope"></i></a></li>
<li><a href="https://github.com/Turbo87/sidebar-v2" role="tab" target="_blank"><i class="fa fa-github"></i></a></li>
</ul>

<ul role="tablist">
Expand Down
1 change: 1 addition & 0 deletions examples/position-right.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
<li><a href="#home" role="tab"><i class="fa fa-bars"></i></a></li>
<li><a href="#profile" role="tab"><i class="fa fa-user"></i></a></li>
<li class="disabled"><a href="#messages" role="tab"><i class="fa fa-envelope"></i></a></li>
<li><a href="https://github.com/Turbo87/sidebar-v2" role="tab" target="_blank"><i class="fa fa-github"></i></a></li>
</ul>

<ul role="tablist">
Expand Down
2 changes: 1 addition & 1 deletion js/jquery-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $.fn.sidebar = function(options) {

$sidebar.addClass('sidebar-' + options.position);

$tabs.children('li').children('a').on('click', function(e) {
$tabs.children('li').children('a[href^="#"]').on('click', function(e) {
e.preventDefault();
var $tab = $(this).closest('li');

Expand Down
2 changes: 1 addition & 1 deletion js/jquery-sidebar.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3905461

Please sign in to comment.