+ 6
Yes just wrap your event handler function in a setTimeout() call with a anonymous function as argument... without delay: <div onclick="alert('click')">click me</div> with delay: <div onclick="setTimeout(()=>{alert('2s delayed click')},2000)">click me</div>
17th Mar 2018, 8:53 PM
visph
visph - avatar
+ 6
You must be more descriptive and talk with right words if you're hoping to get an answer to your question... Firstly "hover" is not an event, "hover" is a css pseudo-class: https://developer.mozilla.org/en-US/docs/Web/CSS/:hover Anyway, your question is unclear ^^ You may be refering to this code of yours: https://code.sololearn.com/Wj0xTb7mbg9H/?ref=app ... but then you should link it with your question, and specify what you're "trying to modify": are you still refering to your initial question and do you want to delay something? or modify another thing? then in which manner? and what thing? You could delay the transition effect applied on the element when :hover pseudo-class is applied, but delaying "a hover after a transform rotate" doesn't mean anything... or could have too much meaning to be answered without further description of your expectation :P https://developer.mozilla.org/en-US/docs/Web/CSS/transition
21st Mar 2018, 6:30 AM
visph
visph - avatar
+ 4
No, but your function can set a timer event for whatever delay you want to handle it later.
17th Mar 2018, 8:34 PM
John Wells
John Wells - avatar