Blame view

js/main.js 4.31 KB
87e21225   Andy   new webportal
1
  $(document).on('ready', function(){
4569bbd1   liuqimichale   init website
2
  
87e21225   Andy   new webportal
3
4
5
6
7
8
9
  		// Header position  //
  		jQuery(window).on('scroll', function() {
  			if ($(this).scrollTop() > 200) {
  				$('#header .header-inner').addClass("sticky");
  			} else {
  				$('#header .header-inner').removeClass("sticky");
  			}
4569bbd1   liuqimichale   init website
10
  		});
87e21225   Andy   new webportal
11
12
13
14
15
16
17
  	
  	
  		// Mobile Menu  //
  		$(function(){
  			$('#nav').slicknav({
  				'label' : '',
  				'prependTo': '.mobile-menu',
4569bbd1   liuqimichale   init website
18
  				
87e21225   Andy   new webportal
19
  			});
4569bbd1   liuqimichale   init website
20
  		});
87e21225   Andy   new webportal
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
  	
  	
  		// Testimonial Slider //
  		$('.testimonial-slider').owlCarousel({
  				items:1,
  				autoplay:true,
  				autoplayTimeout:3500,
  				smartSpeed: 1000,
  				autoplayHoverPause:true,
  				loop:true,
  				merge:true,
  				nav:false,
  				dots:true,
  			});
  		
  		//  Portfolio //
  		$('.single-pf').owlCarousel({
  			items:1,
  			autoplay:false,
  			autoplayTimeout:4500,
  			smartSpeed: 1000,
  			autoplayHoverPause:true,
  			margin:15,
  			loop:true,
  			merge:true,
  			nav:true,
  			dots:false,
  			navText: ['PREVIOUS', 'NEXT'],
  		});
  		
  		
  		//  Client Slider //
  		$('.clients-slider').owlCarousel({
  			autoplay:true,
  			autoplayTimeout:3000,
  			margin:15,
  			smartSpeed: 1000,
  			autoplayHoverPause:true,
  			loop:true,
  			nav:false,
  			dots:false,
  			responsive:{
  				300: {
  					items:2,
  				},
  				480: {
  					items:3,
  				},
  				768: {
  					items:4,
  				},
  				1170: {
  					items:6,
  				}
4569bbd1   liuqimichale   init website
75
  			}
4569bbd1   liuqimichale   init website
76
  		});
87e21225   Andy   new webportal
77
78
79
80
81
82
  	
  		//  Popup JS //
  		$('.popup').magnificPopup({
  			type: 'image',
  			gallery:{
  			enabled:true
4569bbd1   liuqimichale   init website
83
  			}
87e21225   Andy   new webportal
84
85
86
87
88
89
90
91
  		});
  		
  		
  		
  		// stellar //
  			$.stellar({
  		  horizontalOffset: 0,
  		  verticalOffset: 0
4569bbd1   liuqimichale   init website
92
93
  		});
  
87e21225   Andy   new webportal
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
  		
  
  		// Wow Animate  //
  		var wow = new WOW(
  		{
  			boxClass:     'wow',      // animated element css class (default is wow)
  			animateClass: 'animated', // animation css class (default is animated)
  			offset:       0,          // distance to the element when triggering the animation (default is 0)
  			mobile:       false,       // trigger animations on mobile devices (default is true)
  			live:         true,       // act on asynchronously loaded content (default is true)
  			callback:     function(box) {
  			  // the callback is fired every time an animation is started
  			  // the argument that is passed in is the DOM node being animated
  			},
  			scrollContainer: null // optional scroll container selector, otherwise use window
  		  }
  		);
  		wow.init();
  	
  	
  		/*====================================
  			Isotop
  		======================================*/ 
  		$(window).on('load', function() {
4569bbd1   liuqimichale   init website
118
  			
87e21225   Andy   new webportal
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
  			if ($.fn.isotope) {
                  $(".isotop-active").isotope({
                      filter: '*',
                  });
  
  					$('.works-menu ul li').on('click', function() {
                      $(".works-menu ul li").removeClass("active");
                      $(this).addClass("active");
  
                      var selector = $(this).attr('data-filter');
                      $(".isotop-active").isotope({
                          filter: selector,
                          animationOptions: {
                              duration: 750,
                              easing: 'linear',
                              queue: true,
                          }
                      });
                      return false;
                  });
              }
4569bbd1   liuqimichale   init website
140
  		});
87e21225   Andy   new webportal
141
142
143
144
145
146
147
  		
  		
  		// onePageNav  //
  		$('#nav').onePageNav({
  			changeHash: false,
  			scrollSpeed: 1000,
  			filter: '',
4569bbd1   liuqimichale   init website
148
  		});
87e21225   Andy   new webportal
149
150
151
152
153
154
155
156
157
158
159
160
161
  		
  		// Scroll Up JS  //
  		$(function () {
  		  $.scrollUp({
  			scrollName: 'scrollUp', // Element ID
  			topDistance: '300', // Distance from top before showing element (px)
  			topSpeed: 300, // Speed back to top (ms)
  			animation: 'fade', // Fade, slide, none
  			animationInSpeed: 200, // Animation in speed (ms)
  			animationOutSpeed: 200, // Animation out speed (ms)
  			scrollText: ["<i class='fa fa-rocket'></i>"], // Text for element
  			activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
  		  });
4569bbd1   liuqimichale   init website
162
  		});
87e21225   Andy   new webportal
163
164
165
166
167
168
169
170
171
  		
  		
  		// counterUp //
  		$('.counter').counterUp({
  			delay: 10,
  			time: 2500,
  				
  		});
  		
4569bbd1   liuqimichale   init website
172
  	
87e21225   Andy   new webportal
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
  		// GMaps //
  		var map = new GMaps({
  		  el: '#map',
  		  lat: 22.933046,
  		  lng: 90.827027
  		});
  		var map = new GMaps({
  				el: '#map',
  				lat: 22.933046,
  				lng: 90.827027,
  				scrollwheel: false,
  			});
  			map.addMarker({
  				lat: 22.933046,
  				lng: 90.827027,
  				title: 'Welcome to SOHEL',
  				infoWindow: {
  				content: '<p>Welcome To Clipping Hunt</p>'
  			}
  		
  		});
  		
  		// Preloader
  		$(window).on('load', function() {
  				$('.loader').fadeOut('slow', function(){
  				$(this).remove();
  			});
  		});
  })(jQuery);