I want to add a delay on this mouseenter shown below. Can anybody help me with this "_on" method, pls? I tried with setTimeout, but it won't work.
This is the code:
declareEvents: function () {
var me = this,
$el;
$.each(me._$listItems, function (i, el) {
$el = $(el);
me._on($el, 'mouseenter', $.proxy(me.onListItemEnter, me, i, $el));
},
What I've tried:
setTimeout(function() {
me._on($el, 'mouseenter', $.proxy(me.onListItemEnter, me, i, $el));
}, 1000);
And:
me._on($el, 'mouseenter', setTimeout(function() {
$.proxy(me.onListItemEnter, me, i, $el);
}, 1000);
Thank you very much for you help!