문제

I am making a little game with jQuery, and I wondered if it is possible to fire an event on hover and/or mouseenter when pressing Ctrl?

도움이 되었습니까?

해결책

bind mouseenter and keypress event for element on which you want things to work out.

$( "#id_of_element" ).bind('mouseenter keypress', function(event) {
if (event.ctrlKey)//check if cntrl key is pressed
{
//your code here
}
});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top