scrolltojs-rails 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/lib/scrolltojs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/{con_theme.js → landing.js} +0 -0
  4. data/vendor/assets/javascripts/third_landing_page/common.js +468 -0
  5. data/vendor/assets/javascripts/third_landing_page/jwplayer.flash.swf +0 -0
  6. data/vendor/assets/javascripts/third_landing_page/jwplayer.html5.js +258 -0
  7. data/vendor/assets/javascripts/third_landing_page/jwplayer.js +138 -0
  8. data/vendor/assets/javascripts/third_landing_page/main.js +669 -0
  9. data/vendor/assets/javascripts/third_landing_page/owl.carousel.min.js +47 -0
  10. data/vendor/assets/javascripts/third_landing_page/vendor/bootstrap.min.js +7 -0
  11. data/vendor/assets/javascripts/third_landing_page/vendor/detectmobilebrowser.js +7 -0
  12. data/vendor/assets/javascripts/third_landing_page/vendor/gmaps.js +2149 -0
  13. data/vendor/assets/javascripts/third_landing_page/vendor/html5shiv.js +301 -0
  14. data/vendor/assets/javascripts/third_landing_page/vendor/isotope.pkgd.min.js +8 -0
  15. data/vendor/assets/javascripts/third_landing_page/vendor/jquery-1.10.2.min.js +6 -0
  16. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.ajaxchimp.min.js +1 -0
  17. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.counterup.min.js +8 -0
  18. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.easing.1.3.js +205 -0
  19. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.fitvids.js +83 -0
  20. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.nicescroll.min.js +114 -0
  21. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.stellar.js +660 -0
  22. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.timeago.js +214 -0
  23. data/vendor/assets/javascripts/third_landing_page/vendor/jquery.tubular.1.0.js +148 -0
  24. data/vendor/assets/javascripts/third_landing_page/vendor/matchMedia.js +46 -0
  25. data/vendor/assets/javascripts/third_landing_page/vendor/materialize.min.js +10 -0
  26. data/vendor/assets/javascripts/third_landing_page/vendor/owl.carousel.min.js +47 -0
  27. data/vendor/assets/javascripts/third_landing_page/vendor/tweetie.js +142 -0
  28. data/vendor/assets/javascripts/third_landing_page/vendor/waypoints.js +8 -0
  29. data/vendor/assets/javascripts/third_landing_page/vendor/wow.min.js +2 -0
  30. data/vendor/assets/stylesheets/third_landing_page/animate.min.css +6 -0
  31. data/vendor/assets/stylesheets/third_landing_page/blog-single.css +657 -0
  32. data/vendor/assets/stylesheets/third_landing_page/blog.css +168 -0
  33. data/vendor/assets/stylesheets/third_landing_page/bootstrap.min.css +10 -0
  34. data/vendor/assets/stylesheets/third_landing_page/colors/color1.css +164 -0
  35. data/vendor/assets/stylesheets/third_landing_page/colors/color2.css +164 -0
  36. data/vendor/assets/stylesheets/third_landing_page/colors/color3.css +164 -0
  37. data/vendor/assets/stylesheets/third_landing_page/colors/color4.css +164 -0
  38. data/vendor/assets/stylesheets/third_landing_page/colors/color5.css +164 -0
  39. data/vendor/assets/stylesheets/third_landing_page/colors/color6.css +164 -0
  40. data/vendor/assets/stylesheets/third_landing_page/colors/color7.css +164 -0
  41. data/vendor/assets/stylesheets/third_landing_page/colors/color8.css +164 -0
  42. data/vendor/assets/stylesheets/third_landing_page/ionicons.min.css +11 -0
  43. data/vendor/assets/stylesheets/third_landing_page/main.css +2500 -0
  44. data/vendor/assets/stylesheets/third_landing_page/owl.carousel.css +71 -0
  45. data/vendor/assets/stylesheets/third_landing_page/owl.theme.css +79 -0
  46. data/vendor/assets/stylesheets/third_landing_page/owl.transitions.css +163 -0
  47. data/vendor/assets/stylesheets/third_landing_page/responsive.css +856 -0
  48. metadata +47 -8
  49. data/vendor/assets/javascripts/con_theme/_con.min.js +0 -11
  50. data/vendor/assets/javascripts/con_theme/materialize.min.js +0 -10
  51. data/vendor/assets/javascripts/con_theme/nanoscroller.min.js +0 -16
  52. data/vendor/assets/javascripts/con_theme/requestAnimationFrame.min.js +0 -4
  53. data/vendor/assets/javascripts/con_theme/sortable.min.js +0 -2
@@ -0,0 +1,669 @@
1
+ "use strict";
2
+ var $ = jQuery;
3
+
4
+
5
+ // for fix offer image
6
+ function fixOfferImageHeight() {
7
+ var image = $('.offer-image-area img');
8
+ if ( image.length > 0 ) {
9
+ var height = image.height() + 'px';
10
+ $('.offer-content-wrapper').css('min-height', height);
11
+ }
12
+ }
13
+
14
+ // for fix banner height
15
+ function fixBannerHeight() {
16
+ var banner = $('.banner');
17
+ if ( banner.length > 0 ) {
18
+ var height = $(window).height();
19
+ banner.css('min-height', height);
20
+ }
21
+ }
22
+
23
+
24
+ // Fix features height
25
+
26
+ function fixFeaturesHeight(){
27
+ var featureItems = $('.feature-lists-style-three .feature-list');
28
+
29
+ if ( featureItems.length > 0 ) {
30
+ var featureHeight = featureItems.getMaxHeight();
31
+ featureItems.height(featureHeight);
32
+ }
33
+ }
34
+
35
+ // Screenshoot Slider
36
+ (function(){
37
+ var screenshoot_slider_obj = {};
38
+
39
+ screenshoot_slider_obj.callback = function() {
40
+ screenshoot_slider_obj.addingClasses(this);
41
+ };
42
+
43
+ screenshoot_slider_obj.addingClasses = function(e) {
44
+
45
+ $(e.$owlItems).removeClass('opacity80 opacity100 left-item center-item right-item');
46
+ var $currentItems = $(e.$owlWrapper).find('.owl-item.active');
47
+ var middleItemIndex;
48
+
49
+ if ( e.options.items == 5 ) {
50
+ middleItemIndex = $currentItems.eq(2).index();
51
+ } else if ( e.options.items == 3 ) {
52
+ middleItemIndex = $currentItems.eq(1).index();
53
+ } else {
54
+ middleItemIndex = $currentItems.eq(0).index();
55
+ }
56
+
57
+ $(e.$owlItems).each(function(){
58
+ if ( $(this).index() < middleItemIndex ) {
59
+ $(this).addClass('left-item');
60
+ } else if ( $(this).index() > middleItemIndex ) {
61
+ $(this).addClass('right-item');
62
+ } else {
63
+ $(this).addClass('center-item');
64
+ }
65
+ });
66
+ };
67
+
68
+
69
+ var $screenshoot_slider = $('#screenshoot_slider');
70
+
71
+
72
+ if ( $screenshoot_slider.length > 0 ) {
73
+ $screenshoot_slider.owlCarousel({
74
+ stopOnHover : true,
75
+ slideSpeed : 800,
76
+ autoHeight : true,
77
+ itemsCustom: [
78
+ [320, 1],
79
+ [450, 2],
80
+ [580, 3],
81
+ [992, 5]
82
+ ],
83
+ addClassActive : true,
84
+ afterInit : screenshoot_slider_obj.callback,
85
+ afterMove : screenshoot_slider_obj.callback
86
+ });
87
+
88
+ screenshoot_slider_obj.slider = $screenshoot_slider.data('owlCarousel');
89
+
90
+ $('.screenshoot-arrow').click(function(e){
91
+
92
+ e.preventDefault();
93
+
94
+ if ( $(this).hasClass('left-arrow') ) {
95
+ screenshoot_slider_obj.slider.prev();
96
+ } else {
97
+ screenshoot_slider_obj.slider.next();
98
+ }
99
+ });
100
+ }
101
+ }());
102
+
103
+ // App brief Slider
104
+ (function(){
105
+ var app_brief_slider_obj = {};
106
+
107
+ app_brief_slider_obj.callback = function() {
108
+ app_brief_slider_obj.addingClasses(this);
109
+ };
110
+
111
+ app_brief_slider_obj.addingClasses = function(e) {
112
+ var $currentItem = $(e.$owlWrapper).find('.owl-item.active'),
113
+ middleItemIndex = $currentItem.index();
114
+
115
+ $(e.$owlItems).each(function(){
116
+ if ( $(this).index() < middleItemIndex ) {
117
+ $(this).removeClass('center left-item right-item').addClass('left-item');
118
+ } else if ( $(this).index() > middleItemIndex ) {
119
+ $(this).removeClass('center left-item right-item').addClass('right-item');
120
+ } else {
121
+ $(this).removeClass('center left-item right-item');
122
+ }
123
+ });
124
+ };
125
+
126
+
127
+ var $app_brief_slider = $('#app-brief-slider');
128
+
129
+
130
+ if ( $app_brief_slider.length > 0 ) {
131
+ $app_brief_slider.owlCarousel({
132
+ slideSpeed : 1200,
133
+ paginationSpeed : 1200,
134
+ rewindSpeed : 2000,
135
+ addClassActive : true,
136
+ singleItem : true,
137
+ afterInit : app_brief_slider_obj.callback,
138
+ afterMove : app_brief_slider_obj.callback
139
+ });
140
+
141
+ app_brief_slider_obj.slider = $app_brief_slider.data('owlCarousel');
142
+
143
+ $('app-brief-arrow').click(function(e){
144
+
145
+ e.preventDefault();
146
+
147
+ if ( $(this).hasClass('left-arrow') ) {
148
+ app_brief_slider_obj.slider.prev();
149
+ } else {
150
+ app_brief_slider_obj.slider.next();
151
+ }
152
+ });
153
+ }
154
+ }());
155
+
156
+
157
+ // Testimonial Slider
158
+ (function(){
159
+
160
+ var testimonial_slider_obj = {},
161
+ thumbLists = $('#testimonial-thumb-ctrl li');
162
+
163
+ testimonial_slider_obj.beforeMoveCallback = function(){
164
+ var currentIndex = this.currentItem;
165
+ thumbLists.removeClass('active').eq(currentIndex).addClass('active');
166
+ };
167
+
168
+ var $testimonial_slider = $('#testimonial');
169
+
170
+ if ( $testimonial_slider.length > 0 ) {
171
+
172
+ $testimonial_slider.owlCarousel({
173
+ stopOnHover : true,
174
+ slideSpeed : 800,
175
+ singleItem : true,
176
+ pagination : false,
177
+ afterMove : testimonial_slider_obj.beforeMoveCallback
178
+ });
179
+
180
+ testimonial_slider_obj.slider = $testimonial_slider.data('owlCarousel');
181
+
182
+ $('#testimonial-thumb-ctrl li a').on('click', function(e){
183
+ e.preventDefault();
184
+ var userSlide = $(this).parent().index();
185
+ testimonial_slider_obj.slider.goTo(userSlide);
186
+ });
187
+ }
188
+
189
+ }());
190
+
191
+ // Why Slider
192
+
193
+ (function(){
194
+ function show( item ) {
195
+ item.removeClass('inactive').addClass('active').animate({
196
+ 'left' : '0px'
197
+ }, 1300, 'swing');
198
+
199
+ lists.eq(current).addClass('active').siblings('li').removeClass('active');
200
+ }
201
+
202
+ function hide( item ) {
203
+ item.removeClass('active').addClass('inactive').animate({
204
+ 'left' : '-100%'
205
+ }, 1300, 'swing', function(){
206
+ $(this).css('left', '100%').removeClass('inactive');
207
+ });
208
+ }
209
+
210
+ if ( $('#whySlider:visible').length > 0 ) {
211
+ var sliderWrap = $('#whySlider:visible'),
212
+ slideItems = sliderWrap.children(),
213
+ height = slideItems.getMaxHeight(),
214
+ lists = $('#why-feature-lists li'),
215
+ current = 0;
216
+ sliderWrap.height( height );
217
+
218
+ $(window).resize(function(){
219
+ height = slideItems.getMaxHeight();
220
+ sliderWrap.height( height );
221
+ });
222
+
223
+
224
+ sliderWrap.waypoint({
225
+ handler: function(event, direction) {
226
+ show( slideItems.eq(current) );
227
+ $(this).waypoint('destroy');
228
+ },
229
+ offset: '60%'
230
+ });
231
+
232
+ lists.find('a').on('click', function(e){
233
+ e.preventDefault();
234
+
235
+ if ( jQuery.browser.mobile === true ) {
236
+ return false;
237
+ }
238
+
239
+ if ( slideItems.is(':animated') ) {
240
+ return false;
241
+ }
242
+
243
+ var oldCurrent = current;
244
+ current = $(this).parent().index();
245
+
246
+ if ( current === oldCurrent ) {
247
+ return false;
248
+ }
249
+
250
+ hide( slideItems.eq(oldCurrent) );
251
+ show( slideItems.eq(current) );
252
+
253
+ return $(this);
254
+ });
255
+ }
256
+ }());
257
+
258
+
259
+ // Banner Sldier
260
+ (function(){
261
+
262
+ var banner_slider_obj = {};
263
+
264
+ banner_slider_obj.beforeMoveCallback = function(){
265
+ var currentIndex = this.currentItem;
266
+ $('#banner-slider-controller a').removeClass('active').eq(currentIndex).addClass('active');
267
+ };
268
+
269
+ var $banner_slider = $('#banner-sldier');
270
+
271
+ if ( $banner_slider.length > 0 ) {
272
+
273
+ $banner_slider.owlCarousel({
274
+ stopOnHover : true,
275
+ slideSpeed : 800,
276
+ singleItem : true,
277
+ pagination : false,
278
+ afterMove : banner_slider_obj.beforeMoveCallback
279
+ });
280
+
281
+ banner_slider_obj.slider = $banner_slider.data('owlCarousel');
282
+
283
+ $('#banner-slider-controller a').on('click', function(e){
284
+ e.preventDefault();
285
+ var userSlide = $(this).index();
286
+ banner_slider_obj.slider.goTo(userSlide);
287
+ });
288
+ }
289
+ }());
290
+
291
+
292
+ // stellar parallux init
293
+ if ( jQuery.browser.mobile !== true && typeof jQuery.stellar === 'function') {
294
+ $(window).stellar();
295
+ }
296
+
297
+
298
+ // window scroll Sections scrolling
299
+ (function(){
300
+ var sections = $(".scroll-section");
301
+
302
+ function getActiveSectionLength(section, sections) {
303
+ return sections.index(section);
304
+ }
305
+
306
+ if ( sections.length > 0 ) {
307
+
308
+
309
+ sections.waypoint({
310
+ handler: function(event, direction) {
311
+ var active_section, active_section_index, prev_section_index;
312
+ active_section = $(this);
313
+ active_section_index = getActiveSectionLength($(this), sections);
314
+ prev_section_index = ( active_section_index - 1 );
315
+
316
+ if (direction === "up") {
317
+ active_section = sections.eq(prev_section_index);
318
+ }
319
+
320
+
321
+ if ( active_section.attr('id') != 'home' ) {
322
+ var active_link = $('.menu-smooth-scroll[href="#' + active_section.attr("id") + '"]');
323
+ active_link.parent('li').addClass("current").siblings().removeClass("current");
324
+ } else {
325
+ $('.menu-smooth-scroll').parent('li').removeClass('current');
326
+ }
327
+ },
328
+ offset: '35%'
329
+ });
330
+ }
331
+
332
+ }());
333
+
334
+
335
+
336
+
337
+
338
+ // initialize fitvid plugin
339
+ $("body").fitVids();
340
+
341
+
342
+ // Tweets show and slider
343
+ (function(){
344
+ if ( $('#tweets').length > 0 ) {
345
+ $('#tweets').twittie({
346
+ dateFormat: '%b-%d-%Y',
347
+ template : '<p class="timeago tweet-date" title="{{date}}">{{date}}</p><p class="tweet-text">{{tweet}}</p><div class="tweet-controlls"><a class="relpy-btn" href="https://twitter.com/intent/tweet?in_reply_to={{tweetId}}"><i class="ion-reply"></i> Reply</a><a class="retweet-btn" href="https://twitter.com/intent/retweet?tweet_id={{tweetId}}"><i class="fa fa-retweet"></i> Retweet</a><a class="favorite-btn" href="https://twitter.com/intent/favorite?tweet_id={{tweetId}}"><i class="ion-heart"></i> Favorite</a></div>'
348
+ }, function(){
349
+
350
+ jQuery(".timeago").timeago();
351
+
352
+ var $tweet_slider = $("#allTweets");
353
+
354
+ if ( $tweet_slider.length > 0 ) {
355
+ $tweet_slider.owlCarousel({
356
+ slideSpeed : 800,
357
+ singleItem : true
358
+ });
359
+
360
+ var tweetSlider = $tweet_slider.data('owlCarousel');
361
+
362
+
363
+ $('.tweets-arrow').on('click', function(e){
364
+ e.preventDefault();
365
+
366
+ if ( $(this).hasClass('left-arrow') ) {
367
+ tweetSlider.prev();
368
+ } else {
369
+ tweetSlider.next();
370
+ }
371
+ });
372
+ }
373
+ });
374
+ }
375
+ }());
376
+
377
+
378
+
379
+ // Map
380
+ var mapStyle = [
381
+ {
382
+ "featureType": "landscape",
383
+ "stylers": [
384
+ {
385
+ "saturation": -100
386
+ },
387
+ {
388
+ "lightness": 50
389
+ },
390
+ {
391
+ "visibility": "on"
392
+ }
393
+ ]
394
+ },
395
+ {
396
+ "featureType": "poi",
397
+ "stylers": [
398
+ {
399
+ "saturation": -100
400
+ },
401
+ {
402
+ "lightness": 40
403
+ },
404
+ {
405
+ "visibility": "simplified"
406
+ }
407
+ ]
408
+ },
409
+ {
410
+ "featureType": "road.highway",
411
+ "stylers": [
412
+ {
413
+ "saturation": -100
414
+ },
415
+ {
416
+ "visibility": "simplified"
417
+ }
418
+ ]
419
+ },
420
+ {
421
+ "featureType": "road.arterial",
422
+ "stylers": [
423
+ {
424
+ "saturation": -100
425
+ },
426
+ {
427
+ "lightness": 20
428
+ },
429
+ {
430
+ "visibility": "on"
431
+ }
432
+ ]
433
+ },
434
+ {
435
+ "featureType": "road.local",
436
+ "stylers": [
437
+ {
438
+ "saturation": -100
439
+ },
440
+ {
441
+ "lightness": 30
442
+ },
443
+ {
444
+ "visibility": "on"
445
+ }
446
+ ]
447
+ },
448
+ {
449
+ "featureType": "transit",
450
+ "stylers": [
451
+ {
452
+ "saturation": -100
453
+ },
454
+ {
455
+ "visibility": "simplified"
456
+ }
457
+ ]
458
+ },
459
+ {
460
+ "featureType": "administrative.province",
461
+ "stylers": [
462
+ {
463
+ "visibility": "off"
464
+ }
465
+ ]
466
+ },
467
+ {
468
+ "featureType": "water",
469
+ "elementType": "labels",
470
+ "stylers": [
471
+ {
472
+ "visibility": "on"
473
+ },
474
+ {
475
+ "lightness": -0
476
+ },
477
+ {
478
+ "saturation": -0
479
+ }
480
+ ]
481
+ },
482
+ {
483
+ "featureType": "water",
484
+ "elementType": "geometry",
485
+ "stylers": [
486
+ {
487
+ "hue": "#00baff"
488
+ },
489
+ {
490
+ "lightness": -10
491
+ },
492
+ {
493
+ "saturation": -95
494
+ }
495
+ ]
496
+ }
497
+ ];
498
+
499
+ var $mapWrapper = $('#map'), draggableOp;
500
+
501
+
502
+ if ( jQuery.browser.mobile === true ) {
503
+ draggableOp = false;
504
+ } else {
505
+ draggableOp = true;
506
+ }
507
+
508
+ if ( $mapWrapper.length > 0 ) {
509
+ var map = new GMaps({
510
+ div: '#map',
511
+ lat : 23.79473005386213, // Provide your longtitude
512
+ lng : 90.41430473327637, // Provide your longtitude
513
+ scrollwheel: false,
514
+ draggable: draggableOp,
515
+ zoom: 16,
516
+ disableDefaultUI: true,
517
+ styles : mapStyle
518
+ });
519
+
520
+ map.addMarker({
521
+ lat : 23.79473005386213, // Provide your longtitude
522
+ lng : 90.41430473327637, // Provide your longtitude
523
+ icon: 'img/marker.png',
524
+ infoWindow: {
525
+ content: '<p>this is some text</p>' // Provide your address to show on pop up
526
+ }
527
+ });
528
+ }
529
+
530
+
531
+
532
+ // callback after ready the document
533
+ $(document).ready(function(){});
534
+
535
+ // callback after loading the window
536
+ $(window).load(function(){
537
+
538
+ /*============ Fix Offer Image ============*/
539
+
540
+ fixOfferImageHeight();
541
+
542
+
543
+ /*============ Fix Features Height ============*/
544
+
545
+ fixFeaturesHeight();
546
+
547
+
548
+ /*============ Fix Banner Height ============*/
549
+
550
+ fixBannerHeight();
551
+
552
+
553
+
554
+ /*========= Newsletter animations =========*/
555
+
556
+ var $NLFA = $('.newsletter-form-area');
557
+
558
+ if ( $NLFA.length > 0 ) {
559
+ var $NLIT = $NLFA.find('form input[type="email"]'),
560
+ $NLIS = $NLFA.find('form input[type="submit"]').fadeOut(0),
561
+ $NLIC = $NLFA.find('form .mail-icon').fadeOut(0);
562
+
563
+ $NLIT.on('click', function(e){
564
+ e.stopImmediatePropagation();
565
+ $NLIS.stop(true).fadeIn(600);
566
+ $NLIC.stop(true).fadeIn(600);
567
+ });
568
+
569
+ $(window).click(function(){
570
+ $NLIS.stop(true).fadeOut(300);
571
+ $NLIC.stop(true).fadeOut(300);
572
+ });
573
+ }
574
+
575
+
576
+
577
+ /*=========== count up statistic ==========*/
578
+
579
+ var $countNumb = $('.countNumb');
580
+
581
+ if ( $countNumb.length > 0 ) {
582
+ $countNumb.counterUp({
583
+ delay: 15,
584
+ time: 2000
585
+ });
586
+ }
587
+
588
+
589
+
590
+
591
+ /*===== menu click Sections scrolling =====*/
592
+
593
+ $('.menu-smooth-scroll').scrollingTo({
594
+ easing : 'easeOutQuart',
595
+ animationTime : 1800,
596
+ callbackBeforeTransition : function(e){
597
+ if (e.currentTarget.hash !== "") {
598
+ if ( e.currentTarget.hash != '#home' ) {
599
+ $(e.currentTarget).parent().addClass('current').siblings().removeClass('current');
600
+ }
601
+
602
+ if ( e.currentTarget.hash == '#contact' ) {
603
+ $('.contact-content-wrapper').slideDown(600,'easeOutQuart');
604
+ }
605
+ }
606
+ },
607
+ callbackAfterTransition : function(e){
608
+ if (e.currentTarget.hash !== "") {
609
+ if ( e.currentTarget.hash == '#home' ) {
610
+ window.location.hash = '';
611
+ } else {
612
+ window.location.hash = e.currentTarget.hash;
613
+ }
614
+
615
+ }
616
+ }
617
+ });
618
+
619
+
620
+
621
+ /*====== other button scrolling ======*/
622
+
623
+ $('.smooth-scroll:visible').scrollingTo({
624
+ easing : 'easeOutQuart'
625
+ });
626
+
627
+ });
628
+
629
+
630
+ // callback after resize the window
631
+ $(window).resize(function(){
632
+ fixOfferImageHeight();
633
+ fixBannerHeight();
634
+ fixFeaturesHeight();
635
+ });
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+ /* ------------------------------------------------------------------------
644
+ MAILCHIMP
645
+ ------------------------------------------------------------------------ */
646
+
647
+ (function($){
648
+
649
+
650
+ var mchimpMessageArea = $('.mailchimp-form-message');
651
+
652
+ $(document).click(function(){
653
+ mchimpMessageArea.slideUp();
654
+ });
655
+
656
+ $('.mailchimpForm').ajaxChimp({
657
+ callback: function(resp) {
658
+
659
+ console.log(resp);
660
+
661
+ if (resp.result === 'success') {
662
+ mchimpMessageArea.removeClass('error').addClass('success').html('<p>Almost finished... Please confirm your email address.</p>').slideDown();
663
+ } else if(resp.result === 'error') {
664
+ mchimpMessageArea.removeClass('success').addClass('error').html('<p>Please enter a valid email address.</p>').slideDown();
665
+ }
666
+ },
667
+ url: "https://coderpixel.us10.list-manage.com/subscribe/post?u=3918a7d4d5fe9e4c1baa3d912&amp;id=1a52016f23" //Replace this with your own mailchimp post URL. Don't remove the "". Just paste the url inside "".
668
+ });
669
+ }(jQuery));