Skip to content

Commit 955fc6a

Browse files
committed
closes #97
1 parent c2dc1e6 commit 955fc6a

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

public/jquery.selectric.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,12 +462,18 @@
462462
.off(bindSufix);
463463

464464
_this.elements.outerWrapper.on('mouseenter' + bindSufix + ' mouseleave' + bindSufix, function(e) {
465-
$(this).toggleClass(_this.classes.hover);
465+
$(this).toggleClass(_this.classes.hover, e.type === 'mouseenter');
466+
console.log('hover');
466467

467468
// Delay close effect when openOnHover is true
468469
if ( _this.options.openOnHover ) {
469470
clearTimeout(_this.closeTimer);
470-
e.type == 'mouseleave' ? _this.closeTimer = setTimeout($.proxy(_this.close, _this), _this.options.hoverIntentTimeout) : _this.open();
471+
472+
if ( e.type === 'mouseleave' ) {
473+
_this.closeTimer = setTimeout($.proxy(_this.close, _this), _this.options.hoverIntentTimeout);
474+
} else {
475+
_this.open();
476+
}
471477
}
472478
});
473479

0 commit comments

Comments
 (0)