Вопрос

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.

Это было полезно?

Решение

Wrap the 'a' tag in another element, like Div or Span and then bind to that.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top