Merge pull request #58 from mcatominey/mobile-menu-fix
Fixed collapse button on mobile menu: included missing bootstrap js
This commit is contained in:
commit
f540c54482
@ -6508,8 +6508,15 @@ body {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sub-nav-collapse {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.sub-nav-collapse {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
/* Force table to not be like tables anymore */
|
||||
|
@ -6508,8 +6508,15 @@ body {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sub-nav-collapse {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.sub-nav-collapse {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
/* Force table to not be like tables anymore */
|
||||
|
@ -6508,8 +6508,15 @@ body {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sub-nav-collapse {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.sub-nav-collapse {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
/* Force table to not be like tables anymore */
|
||||
|
@ -6508,8 +6508,15 @@ body {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sub-nav-collapse {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.sub-nav-collapse {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 800px) {
|
||||
/* Force table to not be like tables anymore */
|
||||
|
@ -126,6 +126,7 @@ if ($homepage && $homepage_url !== '/') {
|
||||
|
||||
<!-- Navigation -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script>
|
||||
<script src="<?php echo $base_url ?>/js/bootstrap.min.js"></script>
|
||||
<script src="<?php echo $base_url ?>/js/custom.js"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
@ -237,13 +238,13 @@ if ($homepage && $homepage_url !== '/') {
|
||||
<div class="left-column article-tree span3">
|
||||
<!-- For Mobile -->
|
||||
<div class="responsive-collapse">
|
||||
<button type="button" class="btn btn-sidebar" data-toggle="collapse" data-target="#sub-nav-collapse">
|
||||
<button type="button" class="btn btn-sidebar" id="menu-spinner-button">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="sub-nav-collapse" class="collapse in">
|
||||
<div id="sub-nav-collapse" class="sub-nav-collapse">
|
||||
<!-- Navigation -->
|
||||
<?php echo build_nav($tree); ?>
|
||||
|
||||
|
12
js/custom.js
12
js/custom.js
@ -7,4 +7,16 @@ $(function() {
|
||||
|
||||
// Bootstrap Table Class
|
||||
$('table').addClass('table');
|
||||
|
||||
// Responsive menu spinner
|
||||
$('#menu-spinner-button').click(function() {
|
||||
$('#sub-nav-collapse').slideToggle();
|
||||
});
|
||||
|
||||
// Catch browser resize
|
||||
$(window).resize(function() {
|
||||
// Remove transition inline style on large screens
|
||||
if ($(window).width() >= 768)
|
||||
$('#sub-nav-collapse').removeAttr('style');
|
||||
});
|
||||
});
|
@ -265,8 +265,11 @@ html, body {
|
||||
}
|
||||
}
|
||||
.sub-nav-collapse {
|
||||
@media (max-width: 480px) {
|
||||
//display: none;
|
||||
@media (max-width: 768px) {
|
||||
display: none;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user