mirror of
https://hk.gh-proxy.com/https://github.com/NodeBB/nodebb-theme-vanilla.git
synced 2025-10-03 22:25:15 +08:00
collapse nav on ajaxify
This commit is contained in:
parent
5ca3492504
commit
ddca259b1b
2 changed files with 15 additions and 1 deletions
11
lib/vanilla.js
Normal file
11
lib/vanilla.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
"use strict";
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$(window).on('action:ajaxify.start', function() {
|
||||
if ($('.navbar .navbar-collapse').hasClass('in')) {
|
||||
$('.navbar-header button').click();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
|
@ -3,7 +3,10 @@
|
|||
"library": "./lib/theme.js",
|
||||
"hooks": [
|
||||
{
|
||||
"hook": "filter:widgets.getAreas", "method": "defineWidgetAreas", "callbacked": true
|
||||
"hook": "filter:widgets.getAreas", "method": "defineWidgetAreas"
|
||||
}
|
||||
],
|
||||
"scripts": [
|
||||
"lib/vanilla.js"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue