Removed unnecessary JS, minor CSS tweaks, removed extra sections
This commit is contained in:
parent
7121239bee
commit
c9d094e88a
@ -508,10 +508,11 @@ body.mobile-nav-active #mobile-nav-toggle {
|
||||
#network {
|
||||
background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url("../img/datacenter.jpg") fixed center center;
|
||||
background-size: cover;
|
||||
padding: 60px 0 40px 0;
|
||||
padding: 80px 0 60px 0;
|
||||
}
|
||||
|
||||
#network .service-item {
|
||||
margin-top: 60px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
282
index.html
282
index.html
@ -30,9 +30,6 @@
|
||||
<title>E.N. Paul</title>
|
||||
<link rel="shortcut icon" href="img/e-b.png">
|
||||
|
||||
<!-- Google Fonts loader -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Raleway:300,400,500,700,800" rel="stylesheet">
|
||||
|
||||
<!-- CSS references -->
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="css/font-awesome.min.css" rel="stylesheet">
|
||||
@ -43,13 +40,11 @@
|
||||
<!-- JavaScript references -->
|
||||
<script type="text/javascript" src="js/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="js/superfish.hoverIntent.js"></script>
|
||||
<script type="text/javascript" src="js/superfish.min.js"></script>
|
||||
<script type="text/javascript" src="js/morphext.min.js"></script>
|
||||
<script type="text/javascript" src="js/wow.min.js"></script>
|
||||
<script type="text/javascript" src="js/sticky.js"></script>
|
||||
<script type="text/javascript" src="js/easing.min.js"></script>
|
||||
<!--<script type="text/javascript" src="js/hexagons.min.js"></script>-->
|
||||
<script type="text/javascript" src="js/custom.js"></script>
|
||||
|
||||
</head>
|
||||
@ -235,283 +230,6 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!--==========================
|
||||
Porfolio Section
|
||||
============================
|
||||
<section id="portfolio">
|
||||
<div class="container wow fadeInUp">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3 class="section-title">Portfolio</h3>
|
||||
<div class="section-title-divider"></div>
|
||||
<p class="section-description">Si stante, hoc natura videlicet vult, salvam esse se, quod concedimus ses haec dicturum fuisse</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<a class="portfolio-item" style="background-image: url(img/portfolio-1.jpg);" href="">
|
||||
<div class="details">
|
||||
<h4>Portfolio 1</h4>
|
||||
<span>Alored dono par</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<a class="portfolio-item" style="background-image: url(img/portfolio-2.jpg);" href="">
|
||||
<div class="details">
|
||||
<h4>Portfolio 2</h4>
|
||||
<span>Alored dono par</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<a class="portfolio-item" style="background-image: url(img/portfolio-3.jpg);" href="">
|
||||
<div class="details">
|
||||
<h4>Portfolio 3</h4>
|
||||
<span>Alored dono par</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<a class="portfolio-item" style="background-image: url(img/portfolio-4.jpg);" href="">
|
||||
<div class="details">
|
||||
<h4>Portfolio 4</h4>
|
||||
<span>Alored dono par</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<a class="portfolio-item" style="background-image: url(img/portfolio-5.jpg);" href="">
|
||||
<div class="details">
|
||||
<h4>Portfolio 5</h4>
|
||||
<span>Alored dono par</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<a class="portfolio-item" style="background-image: url(img/portfolio-6.jpg);" href="">
|
||||
<div class="details">
|
||||
<h4>Portfolio 6</h4>
|
||||
<span>Alored dono par</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<a class="portfolio-item" style="background-image: url(img/portfolio-7.jpg);" href="">
|
||||
<div class="details">
|
||||
<h4>Portfolio 7</h4>
|
||||
<span>Alored dono par</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<a class="portfolio-item" style="background-image: url(img/portfolio-8.jpg);" href="">
|
||||
<div class="details">
|
||||
<h4>Portfolio 8</h4>
|
||||
<span>Alored dono par</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>-->
|
||||
|
||||
<!--==========================
|
||||
Testimonials Section
|
||||
============================
|
||||
<section id="testimonials">
|
||||
<div class="container wow fadeInUp">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3 class="section-title">Testimonials</h3>
|
||||
<div class="section-title-divider"></div>
|
||||
<p class="section-description">Erdo lide, nora porodo filece, salvam esse se, quod concedimus ses haec dicturum fuisse</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="profile">
|
||||
<div class="pic"><img src="img/client-1.jpg" alt=""></div>
|
||||
<h4>Saul Goodman</h4>
|
||||
<span>Lawless Inc</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="quote">
|
||||
<b><img src="img/quote_sign_left.png" alt=""></b> Proin iaculis purus consequat sem cure digni ssim donec porttitora entum suscipit rhoncus. Accusantium quam, ultricies eget id, aliquam eget nibh et. Maecen aliquam, risus at semper. <small><img src="img/quote_sign_right.png" alt=""></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="quote">
|
||||
<b><img src="img/quote_sign_left.png" alt=""></b> Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis architecto beatae. <small><img src="img/quote_sign_right.png" alt=""></small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="profile">
|
||||
<div class="pic"><img src="img/client-2.jpg" alt=""></div>
|
||||
<h4>Sara Wilsson</h4>
|
||||
<span>Odeo Inc</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>-->
|
||||
|
||||
<!--==========================
|
||||
Team Section
|
||||
============================
|
||||
<section id="team">
|
||||
<div class="container wow fadeInUp">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3 class="section-title">Our Team</h3>
|
||||
<div class="section-title-divider"></div>
|
||||
<p class="section-description">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="member">
|
||||
<div class="pic"><img src="img/team-1.jpg" alt=""></div>
|
||||
<h4>Walter White</h4>
|
||||
<span>Chief Executive Officer</span>
|
||||
<div class="social">
|
||||
<a href=""><i class="fa fa-twitter"></i></a>
|
||||
<a href=""><i class="fa fa-facebook"></i></a>
|
||||
<a href=""><i class="fa fa-google-plus"></i></a>
|
||||
<a href=""><i class="fa fa-linkedin"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="member">
|
||||
<div class="pic"><img src="img/team-2.jpg" alt=""></div>
|
||||
<h4>Sarah Jhinson</h4>
|
||||
<span>Product Manager</span>
|
||||
<div class="social">
|
||||
<a href=""><i class="fa fa-twitter"></i></a>
|
||||
<a href=""><i class="fa fa-facebook"></i></a>
|
||||
<a href=""><i class="fa fa-google-plus"></i></a>
|
||||
<a href=""><i class="fa fa-linkedin"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="member">
|
||||
<div class="pic"><img src="img/team-3.jpg" alt=""></div>
|
||||
<h4>William Anderson</h4>
|
||||
<span>CTO</span>
|
||||
<div class="social">
|
||||
<a href=""><i class="fa fa-twitter"></i></a>
|
||||
<a href=""><i class="fa fa-facebook"></i></a>
|
||||
<a href=""><i class="fa fa-google-plus"></i></a>
|
||||
<a href=""><i class="fa fa-linkedin"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="member">
|
||||
<div class="pic"><img src="img/team-4.jpg" alt=""></div>
|
||||
<h4>Amanda Jepson</h4>
|
||||
<span>Accountant</span>
|
||||
<div class="social">
|
||||
<a href=""><i class="fa fa-twitter"></i></a>
|
||||
<a href=""><i class="fa fa-facebook"></i></a>
|
||||
<a href=""><i class="fa fa-google-plus"></i></a>
|
||||
<a href=""><i class="fa fa-linkedin"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>-->
|
||||
|
||||
<!--==========================
|
||||
Contact Section
|
||||
============================
|
||||
<section id="contact">
|
||||
<div class="container wow fadeInUp">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h3 class="section-title">Contact Us</h3>
|
||||
<div class="section-title-divider"></div>
|
||||
<p class="section-description">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-md-push-2">
|
||||
<div class="info">
|
||||
<div>
|
||||
<i class="fa fa-map-marker"></i>
|
||||
<p>A108 Adam Street<br>New York, NY 535022</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<i class="fa fa-envelope"></i>
|
||||
<p>info@example.com</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<i class="fa fa-phone"></i>
|
||||
<p>+1 5589 55488 55s</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-md-push-2">
|
||||
<div class="form">
|
||||
<div id="sendmessage">Your message has been sent. Thank you!</div>
|
||||
<div id="errormessage"></div>
|
||||
<form action="" method="post" role="form" class="contactForm">
|
||||
<div class="form-group">
|
||||
<input type="text" name="name" class="form-control" id="name" placeholder="Your Name" data-rule="minlen:4" data-msg="Please enter at least 4 chars" />
|
||||
<div class="validation"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="email" class="form-control" name="email" id="email" placeholder="Your Email" data-rule="email" data-msg="Please enter a valid email" />
|
||||
<div class="validation"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="subject" id="subject" placeholder="Subject" data-rule="minlen:4" data-msg="Please enter at least 8 chars of subject" />
|
||||
<div class="validation"></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" name="message" rows="5" data-rule="required" data-msg="Please write something for us" placeholder="Message"></textarea>
|
||||
<div class="validation"></div>
|
||||
</div>
|
||||
<div class="text-center"><button type="submit">Send Message</button></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>-->
|
||||
|
||||
<!--==========================
|
||||
Footer
|
||||
============================-->
|
||||
<footer id="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
1
js/hexagons.min.js
vendored
1
js/hexagons.min.js
vendored
@ -1 +0,0 @@
|
||||
jQuery(function(){jQuery(".hb-lg").parent().addClass("hb-lg-margin"),jQuery(".hb-md").parent().addClass("hb-md-margin"),jQuery(".hb-sm").parent().addClass("hb-sm-margin"),jQuery(".hb-xs").parent().addClass("hb-xs-margin")}),jQuery(function(){jQuery(".hb .fa-facebook,.hb .fa-facebook-square").parent().addClass("hb-facebook"),jQuery(".hb.inv .fa-facebook,.hb.inv .fa-facebook-square").parent().addClass("hb-facebook-inv").removeClass("hb-facebook"),jQuery(".hb .fa-twitter,.hb .fa-twitter-square").parent().addClass("hb-twitter"),jQuery(".hb.inv .fa-twitter,.hb.inv .fa-twitter-square").parent().addClass("hb-twitter-inv").removeClass("hb-twitter"),jQuery(".hb .fa-google-plus,.hb .fa-google-plus-square").parent().addClass("hb-google-plus"),jQuery(".hb.inv .fa-google-plus,.hb.inv .fa-google-plus-square").parent().addClass("hb-google-plus-inv").removeClass("hb-google-plus"),jQuery(".hb .fa-youtube,.hb .fa-youtube-square, .hb .fa-youtube-play").parent().addClass("hb-youtube"),jQuery(".hb.inv .fa-youtube,.hb.inv .fa-youtube-square, .hb.inv .fa-youtube-play").parent().addClass("hb-youtube-inv").removeClass("hb-youtube"),jQuery(".hb .fa-linkedin,.hb .fa-linkedin-square").parent().addClass("hb-linkedin"),jQuery(".hb.inv .fa-linkedin,.hb.inv .fa-linkedin-square").parent().addClass("hb-linkedin-inv").removeClass("hb-linkedin"),jQuery(".hb .fa-tumblr,.hb .fa-tumblr-square").parent().addClass("hb-tumblr"),jQuery(".hb.inv .fa-tumblr,.hb.inv .fa-tumblr-square").parent().addClass("hb-tumblr-inv").removeClass("hb-tumblr"),jQuery(".hb .fa-rss,.hb .fa-rss-square").parent().addClass("hb-rss"),jQuery(".hb.inv .fa-rss,.hb.inv .fa-rss-square").parent().addClass("hb-rss-inv").removeClass("hb-rss"),jQuery(".hb .fa-pinterest,.hb .fa-pinterest-square").parent().addClass("hb-pinterest"),jQuery(".hb.inv .fa-pinterest,.hb.inv .fa-pinterest-square").parent().addClass("hb-pinterest-inv").removeClass("hb-pinterest"),jQuery(".hb .fa-vimeo-square").parent().addClass("hb-vimeo"),jQuery(".hb.inv .fa-vimeo-square").parent().addClass("hb-vimeo-inv").removeClass("hb-vimeo"),jQuery(".hb .fa-github,.hb .fa-github-square, .hb .fa-github-alt").parent().addClass("hb-github"),jQuery(".hb.inv .fa-github,.hb.inv .fa-github-square, .hb.inv .fa-github-alt").parent().addClass("hb-github-inv").removeClass("hb-github"),jQuery(".hb .fa-flickr").parent().addClass("hb-flickr"),jQuery(".hb.inv .fa-flickr").parent().addClass("hb-flickr-inv").removeClass("hb-flickr"),jQuery(".hb .fa-dropbox").parent().addClass("hb-dropbox"),jQuery(".hb.inv .fa-dropbox").parent().addClass("hb-dropbox-inv").removeClass("hb-dropbox"),jQuery(".hb .fa-xing, .hb .fa-xing-square").parent().addClass("hb-xing"),jQuery(".hb.inv .fa-xing, .hb.inv .fa-xing-square").parent().addClass("hb-xing-inv").removeClass("hb-xing"),jQuery(".hb .fa-skype").parent().addClass("hb-skype"),jQuery(".hb.inv .fa-skype").parent().addClass("hb-skype-inv").removeClass("hb-skype"),jQuery(".hb .fa-dribbble").parent().addClass("hb-dribbble"),jQuery(".hb.inv .fa-dribbble").parent().addClass("hb-dribbble-inv").removeClass("hb-dribbble"),jQuery(".hb .fa-tencent-weibo").parent().addClass("hb-tencent-weibo"),jQuery(".hb.inv .fa-tencent-weibo").parent().addClass("hb-tencent-weibo-inv").removeClass("hb-tencent-weibo"),jQuery(".hb .fa-instragram").parent().addClass("hb-instragram"),jQuery(".hb.inv .fa-instragram").parent().addClass("hb-instragram-inv").removeClass("hb-instragram")});
|
@ -1,158 +0,0 @@
|
||||
/*!
|
||||
* hoverIntent v1.8.1 // 2014.08.11 // jQuery v1.9.1+
|
||||
* http://briancherne.github.io/jquery-hoverIntent/
|
||||
*
|
||||
* You may use hoverIntent under the terms of the MIT license. Basically that
|
||||
* means you are free to use hoverIntent as long as this header is left intact.
|
||||
* Copyright 2007, 2014 Brian Cherne
|
||||
*/
|
||||
|
||||
/* hoverIntent is similar to jQuery's built-in "hover" method except that
|
||||
* instead of firing the handlerIn function immediately, hoverIntent checks
|
||||
* to see if the user's mouse has slowed down (beneath the sensitivity
|
||||
* threshold) before firing the event. The handlerOut function is only
|
||||
* called after a matching handlerIn.
|
||||
*
|
||||
* // basic usage ... just like .hover()
|
||||
* .hoverIntent( handlerIn, handlerOut )
|
||||
* .hoverIntent( handlerInOut )
|
||||
*
|
||||
* // basic usage ... with event delegation!
|
||||
* .hoverIntent( handlerIn, handlerOut, selector )
|
||||
* .hoverIntent( handlerInOut, selector )
|
||||
*
|
||||
* // using a basic configuration object
|
||||
* .hoverIntent( config )
|
||||
*
|
||||
* @param handlerIn function OR configuration object
|
||||
* @param handlerOut function OR selector for delegation OR undefined
|
||||
* @param selector selector OR undefined
|
||||
* @author Brian Cherne <brian(at)cherne(dot)net>
|
||||
*/
|
||||
|
||||
;(function(factory) {
|
||||
'use strict';
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery'], factory);
|
||||
} else if (jQuery && !jQuery.fn.hoverIntent) {
|
||||
factory(jQuery);
|
||||
}
|
||||
})(function($) {
|
||||
'use strict';
|
||||
|
||||
// default configuration values
|
||||
var _cfg = {
|
||||
interval: 100,
|
||||
sensitivity: 6,
|
||||
timeout: 0
|
||||
};
|
||||
|
||||
// counter used to generate an ID for each instance
|
||||
var INSTANCE_COUNT = 0;
|
||||
|
||||
// current X and Y position of mouse, updated during mousemove tracking (shared across instances)
|
||||
var cX, cY;
|
||||
|
||||
// saves the current pointer position coordinates based on the given mousemove event
|
||||
var track = function(ev) {
|
||||
cX = ev.pageX;
|
||||
cY = ev.pageY;
|
||||
};
|
||||
|
||||
// compares current and previous mouse positions
|
||||
var compare = function(ev,$el,s,cfg) {
|
||||
// compare mouse positions to see if pointer has slowed enough to trigger `over` function
|
||||
if ( Math.sqrt( (s.pX-cX)*(s.pX-cX) + (s.pY-cY)*(s.pY-cY) ) < cfg.sensitivity ) {
|
||||
$el.off(s.event,track);
|
||||
delete s.timeoutId;
|
||||
// set hoverIntent state as active for this element (permits `out` handler to trigger)
|
||||
s.isActive = true;
|
||||
// overwrite old mouseenter event coordinates with most recent pointer position
|
||||
ev.pageX = cX; ev.pageY = cY;
|
||||
// clear coordinate data from state object
|
||||
delete s.pX; delete s.pY;
|
||||
return cfg.over.apply($el[0],[ev]);
|
||||
} else {
|
||||
// set previous coordinates for next comparison
|
||||
s.pX = cX; s.pY = cY;
|
||||
// use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
|
||||
s.timeoutId = setTimeout( function(){compare(ev, $el, s, cfg);} , cfg.interval );
|
||||
}
|
||||
};
|
||||
|
||||
// triggers given `out` function at configured `timeout` after a mouseleave and clears state
|
||||
var delay = function(ev,$el,s,out) {
|
||||
delete $el.data('hoverIntent')[s.id];
|
||||
return out.apply($el[0],[ev]);
|
||||
};
|
||||
|
||||
$.fn.hoverIntent = function(handlerIn,handlerOut,selector) {
|
||||
// instance ID, used as a key to store and retrieve state information on an element
|
||||
var instanceId = INSTANCE_COUNT++;
|
||||
|
||||
// extend the default configuration and parse parameters
|
||||
var cfg = $.extend({}, _cfg);
|
||||
if ( $.isPlainObject(handlerIn) ) {
|
||||
cfg = $.extend(cfg, handlerIn);
|
||||
if ( !$.isFunction(cfg.out) ) {
|
||||
cfg.out = cfg.over;
|
||||
}
|
||||
} else if ( $.isFunction(handlerOut) ) {
|
||||
cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } );
|
||||
} else {
|
||||
cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } );
|
||||
}
|
||||
|
||||
// A private function for handling mouse 'hovering'
|
||||
var handleHover = function(e) {
|
||||
// cloned event to pass to handlers (copy required for event object to be passed in IE)
|
||||
var ev = $.extend({},e);
|
||||
|
||||
// the current target of the mouse event, wrapped in a jQuery object
|
||||
var $el = $(this);
|
||||
|
||||
// read hoverIntent data from element (or initialize if not present)
|
||||
var hoverIntentData = $el.data('hoverIntent');
|
||||
if (!hoverIntentData) { $el.data('hoverIntent', (hoverIntentData = {})); }
|
||||
|
||||
// read per-instance state from element (or initialize if not present)
|
||||
var state = hoverIntentData[instanceId];
|
||||
if (!state) { hoverIntentData[instanceId] = state = { id: instanceId }; }
|
||||
|
||||
// state properties:
|
||||
// id = instance ID, used to clean up data
|
||||
// timeoutId = timeout ID, reused for tracking mouse position and delaying "out" handler
|
||||
// isActive = plugin state, true after `over` is called just until `out` is called
|
||||
// pX, pY = previously-measured pointer coordinates, updated at each polling interval
|
||||
// event = string representing the namespaced event used for mouse tracking
|
||||
|
||||
// clear any existing timeout
|
||||
if (state.timeoutId) { state.timeoutId = clearTimeout(state.timeoutId); }
|
||||
|
||||
// namespaced event used to register and unregister mousemove tracking
|
||||
var mousemove = state.event = 'mousemove.hoverIntent.hoverIntent'+instanceId;
|
||||
|
||||
// handle the event, based on its type
|
||||
if (e.type === 'mouseenter') {
|
||||
// do nothing if already active
|
||||
if (state.isActive) { return; }
|
||||
// set "previous" X and Y position based on initial entry point
|
||||
state.pX = ev.pageX; state.pY = ev.pageY;
|
||||
// update "current" X and Y position based on mousemove
|
||||
$el.off(mousemove,track).on(mousemove,track);
|
||||
// start polling interval (self-calling timeout) to compare mouse coordinates over time
|
||||
state.timeoutId = setTimeout( function(){compare(ev,$el,state,cfg);} , cfg.interval );
|
||||
} else { // "mouseleave"
|
||||
// do nothing if not already active
|
||||
if (!state.isActive) { return; }
|
||||
// unbind expensive mousemove event
|
||||
$el.off(mousemove,track);
|
||||
// if hoverIntent state is true, then call the mouseOut function after the specified delay
|
||||
state.timeoutId = setTimeout( function(){delay(ev,$el,state,cfg.out);} , cfg.timeout );
|
||||
}
|
||||
};
|
||||
|
||||
// listen for mouseenter and mouseleave
|
||||
return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector);
|
||||
};
|
||||
});
|
Loading…
Reference in New Issue
Block a user