-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
executable file
·158 lines (152 loc) · 4.59 KB
/
main.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
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
jQuery(document).ready(function ($) {
"use strict";
$('.mainmenu-area a[href*="#"]:not([href="#"])').on('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;
}
}
});
$(".carousel-inner .item:first-child").addClass("active");
/*WoW js Active
=================*/
new WOW().init({
mobile: false,
});
/* Scroll to top
===================*/
$.scrollUp({
scrollText: '<i class="icofont icofont-long-arrow-up"></i>',
easingType: 'linear',
scrollSpeed: 900,
animation: 'fade'
});
$('.my-slider').cardslider({
swipe: true,
dots: false,
direction: 'down',
loop: true,
});
//Header Background Slider
$(".home-slide").responsiveSlides({
auto: true, // Boolean: Animate automatically, true or false
speed: 600, // Integer: Speed of the transition, in milliseconds
timeout: 4000, // Integer: Time between slide transitions, in milliseconds
pager: true, // Boolean: Show pager, true or false
});
// Book-details Slider
var book_slide2 = $('.book-details');
book_slide2.owlCarousel({
loop: true,
margin: 30,
autoplay: false,
dots: true,
autoplayTimeout: 4000,
smartSpeed: 600,
responsive: {
0: {
items: 1
},
600: {
items: 1
},
992: {
items: 1
}
}
});
// Book List Slider
var book_slide = $('.book-list');
book_slide.owlCarousel({
loop: true,
margin: 30,
dots: true,
autoplayTimeout: 4000,
smartSpeed: 600,
mouseDrag: true,
touchDrag: false,
animateIn: 'fadeInLeft',
animateOut: 'fadeOutRight',
center: true,
responsive: {
0: {
items: 1
},
600: {
items: 2
},
992: {
items: 2
},
1500: {
items: 4
}
}
});
$('.bookslide_nav .testi_next').on('click', function () {
book_slide.trigger('next.owl.carousel');
});
$('.bookslide_nav .testi_prev').on('click', function () {
book_slide.trigger('prev.owl.carousel');
});
book_slide.on('translate.owl.carousel', function (property) {
$('.book-content .owl-dot:eq(' + property.page.index + ')').click();
});
book_slide2.on('translate.owl.carousel', function (property) {
$('.book-list-photo .owl-dot:eq(' + property.page.index + ')').click();
});
/* Gallery Slider Active
=============================*/
$('.team_slide').owlCarousel({
loop: true,
margin: 10,
responsiveClass: true,
nav: false,
autoplay: true,
autoplayTimeout: 4000,
smartSpeed: 1000,
center: true,
navText: ['<i class="icofont icofont-long-arrow-left"></i>', '<i class="icofont icofont-long-arrow-right"></i>'],
responsive: {
0: {
items: 1,
},
600: {
items: 2
},
1000: {
items: 3
}
}
});
/* Gallery Slider Active
=============================*/
$('.testimonial-slide').owlCarousel({
loop: true,
margin: 10,
responsiveClass: true,
nav: true,
autoplay: true,
autoplayTimeout: 4000,
smartSpeed: 1000,
center: true,
navText: ['<i class="icofont icofont-long-arrow-left"></i>', '<i class="icofont icofont-long-arrow-right"></i>'],
items: 1
});
/* -------------------
Dinamyc-Pagination
----------------------*/
$('#pagination-demo').twbsPagination({
totalPages: 35,
visiblePages: 7,
onPageClick: function (event, page) {
$('#page-content').text('Showing 1 - ' + page + ' of 35');
}
});
$('.wow').parent('div').addClass('fix');
}(jQuery));