-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyPlugins.js
105 lines (60 loc) · 1.79 KB
/
myPlugins.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
$(function(){
'use strict' ;
// slider Window size
$('.slider').height($(window).height());
$(window).resize(function (){
$('.slider').height($(window).height());
});
// Typed.js
var typed = new Typed(".type", {
strings: [
"Designer",
"Developer",
"Abdallah Muhammed.",
"Hope To You Like My Portfolio"
],
typeSpeed: 90,
backSpeed: 90,
loop: true
});
// Scroll Navbar Stike navbar
$(window).scroll(function(){
if ($(window).scrollTop()) {
$('.navbar').addClass('bg-dark');
} else {
$('.navbar').removeClass('bg-dark');
}
});
// Smooth Scroll Navbar
$('.navbar-light .navbar-nav .nav-link').click(function(a){
a.preventDefault();
$('html, body').animate({
scrollTop: $('#' + $(this).data('scroll')).offset().top -10
}, 500);
});
// Navbar Active Link
$('.navbar-light .navbar-nav .nav-link').click(function(){
$('.navbar-light .nav-link').removeClass('active');
$(this).addClass('active');
});
// Sync Navbar With Sections
$(window).scroll(function(){
$('.block').each(function(){
if ($(window).scrollTop() > $(this).offset().top -75) {
var blockID = $(this).attr('id');
$('.navbar-light .navbar-nav .nav-link').removeClass('active');
$('.navbar-light .navbar-nav .nav-link[data-scroll="' + blockID + '"]').addClass('active');
}
});
});
// CountTo Plagin
$('.count').countTo();
//Start Our Dynamic Tabs
$('.dynamic-tabs .work-menu li a ').on('click', function(){
$('.dynamic-tabs .work-menu li a').removeClass('active');
$(this).addClass('active');
// Link with content list
$('.content-list .content-work').hide();
$($(this).data('content')).fadeIn(800);
});
});