Wrap the 'a' tag in another element, like Div or Span and then bind to that.
Can we apply hoverintent plugin twice to same element? (JQuery)
-
30-11-2021 - |
سؤال
I am using hoverintent plugin on "a" tag that contains images inside it.
I want to use it twice because there are two things to be done when one hovers on "a" tag but with different intervals.
//HoverIntent1
$("a.classname").hoverIntent({
sensitivity: 4,
interval: 300,
over: functionName,
timeout: 300,
out: functionName
})
//HoverIntent2
$("a.classname").hoverIntent({
sensitivity: 3,
interval: 10,
over: functionName,
timeout: 10,
out: functionName
})
When I run this it only executes functions inside one hoverintent and not both, I tried to find on net but could not find a satisfactory answer for the same.
المحلول
لا تنتمي إلى StackOverflow