-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.js
More file actions
205 lines (166 loc) · 4.95 KB
/
scripts.js
File metadata and controls
205 lines (166 loc) · 4.95 KB
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
/*
Template Name : Rolling - Freelancer Portfolio Template
Author : UiPasta Team
Website : http://www.uipasta.com/
Support : http://www.uipasta.com/support/
*/
/*
Table Of Content
1. Preloader
2. Smooth Scroll
3. Scroll Naviagation Background Change with Sticky Navigation
4. Mobile Navigation Hide or Collapse on Click
5. Scroll To Top
6. Typed.js
7. Parallax Background
8. Portfolio Filtering
9. Magnific Popup
10. Testimonial Carousel/Slider
11. Statistics Counter
12. Google Map
*/
(function ($) {
"use strict";
jQuery(document).ready(function () {
/* Preloader */
$(window).on("load", function () {
$("body").addClass("loaded");
});
/* Smooth Scroll */
$("a.smoth-scroll").on("click", function (e) {
var anchor = $(this);
$("html, body")
.stop()
.animate(
{
scrollTop: $(anchor.attr("href")).offset().top - 50,
},
1000
);
e.preventDefault();
});
/* Scroll Naviagation Background Change with Sticky Navigation */
$(window).on("scroll", function () {
if ($(window).scrollTop() > 100) {
$(".header-top-area").addClass("navigation-background");
} else {
$(".header-top-area").removeClass("navigation-background");
}
});
/* Mobile Navigation Hide or Collapse on Click */
$(document).on("click", ".navbar-collapse.in", function (e) {
if (
$(e.target).is("a") &&
$(e.target).attr("class") != "dropdown-toggle"
) {
$(this).collapse("hide");
}
});
$("body").scrollspy({
target: ".navbar-collapse",
offset: 195,
});
//embeding youtube video
// $(".youtube-link").grtyoutube();
/* Scroll To Top */
$(window).scroll(function () {
if ($(this).scrollTop() >= 500) {
$(".scroll-to-top").fadeIn();
} else {
$(".scroll-to-top").fadeOut();
}
});
$(".scroll-to-top").click(function () {
$("html, body").animate({ scrollTop: 0 }, 800);
return false;
});
/* Typed.js */
$(window).load(function () {
$(".typing").typed({
strings: [
"I am A Freelancer.",
"I Design Websites.",
"I Develop Android Apps.",
"I am Tech Enthusiast.",
"I am Always Learning...",
] /* You can change the home section typing text from
here and do not use "&" use "and" */,
typeSpeed: 50,
});
});
/* Parallax Background */
$(window).stellar({
responsive: true,
horizontalScrolling: false,
hideDistantElements: false,
horizontalOffset: 0,
verticalOffset: 0,
});
/* Portfolio Filtering */
$(".portfolio-inner").mixItUp();
/* Magnific Popup */
$(".portfolio-popup").magnificPopup({
type: "image",
gallery: { enabled: true },
zoom: { enabled: true, duration: 500 },
image: {
markup:
'<div class="mfp-figure portfolio-pop-up">' +
'<div class="mfp-close"></div>' +
'<div class="mfp-img"></div>' +
'<div class="mfp-bottom-bar portfolio_title">' +
'<div class="mfp-title"></div>' +
'<div class="mfp-counter"></div>' +
"</div>" +
"</div>",
titleSrc: function (item) {
return item.el.attr("title");
},
},
});
/* Testimonial Carousel/Slider */
$(".testimonial-carousel-list").owlCarousel({
items: 1,
autoPlay: true,
stopOnHover: false,
navigation: true,
navigationText: [
"<i class='fa fa-long-arrow-left fa-2x owl-navi'></i>",
"<i class='fa fa-long-arrow-right fa-2x owl-navi'></i>",
],
itemsDesktop: [1199, 1],
itemsDesktopSmall: [980, 1],
itemsTablet: [768, 1],
itemsTabletSmall: false,
itemsMobile: [479, 1],
autoHeight: true,
pagination: false,
transitionStyle: "backSlide",
});
/* Statistics Counter */
$(".statistics").appear(function () {
var counter = $(this).find(".statistics-count");
var toCount = counter.data("count");
$(counter).countTo({
from: 0,
to: toCount,
speed: 5000,
refreshInterval: 50,
});
});
/* Google Map */
$("#my-address").gMap({
zoom: 5,
scrollwheel: true,
maptype: "ROADMAP",
markers: [
{
address: "Kolkata" /* You can change your address from here */,
html:
"<b>Address</b>: <br> Agarpara,Kolkata,India" /* You can change display address text from here */,
popup: true,
},
],
});
});
})(jQuery);