forked from saleh910/simple-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
37 lines (30 loc) · 885 Bytes
/
script.js
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
30
31
32
33
34
35
36
37
$('#navigation a').on('click', function(e) {
e.preventDefault();
var hash = this.hash;
$('html, body').animate({
scrollTop: $(this.hash).offset().top
}, 1000);
});
$('.toggler, .nav-content a:not(#dropdown-link)').on('click', function(){
$('.toggler').toggleClass('change');
$('.nav-content').slideToggle();
$('#dropdown-menu').slideUp();
$('.menu-overlay').toggle();
});
$('.nav-content .dropdown').on('click', function(){
$('#dropdown-menu').slideToggle();
});
$('.menu-overlay').on('click', function(){
$('.toggler').removeClass('change');
$('.nav-content').slideUp();
$('#dropdown-menu').slideUp();
$('.menu-overlay').hide();
});
$("#contact input, #contact textarea").on('focusout', function(){
var text_val = $(this).val();
if (text_val === "") {
$(this).removeClass('has-value');
} else {
$(this).addClass('has-value');
}
});