main.js
2.53 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
/*
Indus by TEMPLATE STOCK
templatestock.co @templatestock
Released for free under the Creative Commons Attribution 3.0 license (templated.co/license)
*/
/* ------------------------------------------------------------------------------
This is jquery module for main page
------------------------------------------------------------------------------ */
/* Global constants */
/*global jQuery */
jQuery(function ($) {
'use strict';
var App = {
$options: {},
$loader: $(".loader"),
$animationload: $(".animationload"),
$countdown: $('#countdown_dashboard'),
bindEvents: function() {
//binding events
$(window).on('load', this.load.bind(this));
$(document).on('ready', this.docReady.bind(this));
},
load: function() {
/* ==============================================
1.Page Preloader
=============================================== */
this.$loader.delay(300).fadeOut();
this.$animationload.delay(600).fadeOut("slow");
},
docReady: function() {
/* -----------------------------------------------------------------------
Countdown
----------------------------------------------------------------------- */
this.$countdown.countDown({
targetDate: {
'day': this.$options.day,
'month': this.$options.month,
'year': this.$options.year,
'hour': this.$options.hour,
'min': this.$options.min,
'sec': this.$options.sec
},
omitWeeks: true
});
/* ==============================================
NiceScroll
=============================================== */
$("html").niceScroll({
scrollspeed: 50,
mousescrollstep: 38,
cursorwidth: 7,
cursorborder: 0,
autohidemode: true,
zindex: 9999999,
horizrailenabled: false,
cursorborderradius: 0
});
/* ==============================================
Parallax
=============================================== */
$(window).stellar({
horizontalScrolling: false,
responsive: true,
scrollProperty: 'scroll',
parallaxElements: false,
horizontalOffset: 0,
verticalOffset: 0
});
//custom app
},
init: function (_options) {
$.extend(this.$options, _options);
this.bindEvents();
}
}
//Initializing the app
//passing the countdown date
App.init({day: 18, month: 2, year: 2016, hour: 11, min: 59, sec: 59});
});