-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathsidemenu.js
More file actions
29 lines (26 loc) · 799 Bytes
/
sidemenu.js
File metadata and controls
29 lines (26 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$("#menu-close").click(function (e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active")
});
$("#menu-close").click(function (e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active")
});
$("#menu-toggle").click(function (e) {
e.preventDefault();
$("#sidebar-wrapper").toggleClass("active")
});
$(function () {
$("a[href*=#]:not([href=#])").click(function () {
if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") || location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $("[name=" + this.hash.slice(1) + "]");
if (target.length) {
$("html,body").animate({
scrollTop: target.offset().top
}, 1000);
return false
}
}
})
});