Every line of 'html onhover' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
239 function hover(hover) { 240 labelMaterial.opacity = hover ? 1.0 : 0.5; 241 markAsChanged(); 242 }
19 function hover(e) { 20 const object = self.objects[self.meshes.indexOf(e.mesh)]; 21 object.onOver({ action: e.action, object }); 22 }
249 export function hover($el: ElementView, options: HoverEventOptions) { 250 let timeout = 0; 251 let active = false; 252 let wasTriggeredByMouse = false; 253 254 $el.on('mouseover', () => { 255 if (options.preventMouseover && options.preventMouseover()) return; 256 clearTimeout(timeout); 257 timeout = delay(() => { 258 if (active) return; 259 if (options.enter) options.enter(); 260 wasTriggeredByMouse = true; 261 active = true; 262 }, options.delay); 263 }); 264 265 $el.on('mouseout', () => { 266 if (!wasTriggeredByMouse) return; 267 clearTimeout(timeout); 268 timeout = delay(() => { 269 if (!active) return; 270 if (options.exit) options.exit(); 271 active = false; 272 }, options.exitDelay || options.delay); 273 }); 274 275 const $clickTarget = options.$clickTarget || $el; 276 $clickTarget.on('click', () => { 277 if (active && (!wasTriggeredByMouse)) { 278 if (options.exit) options.exit(); 279 active = false; 280 } else if (!active) { 281 if (options.enter) options.enter(); 282 wasTriggeredByMouse = false; 283 active = true; 284 } 285 }); 286 287 $el.on('clickOutside', () => { 288 if (!active) return; 289 if (options.exit) options.exit(); 290 active = false; 291 }); 292 }
42 callHoverCallback() { 43 if (typeof this.Canvas.options.onHover === 'function' && this.lastData !== this.currentData) { 44 this.lastData = this.currentData; 45 this.Canvas.options.onHover({ 46 value: this.currentData, 47 x: this.x, 48 y: this.y, 49 }); 50 } 51 }
651 _hoverChanged() { 652 if (!this._ignoreHover) { 653 // Skip if dock is not in autohide mode for instance because it is shown 654 // by intellihide. 655 if (this._autohideIsEnabled) { 656 if (this._box.hover) 657 this._show(); 658 else 659 this._hide(); 660 } 661 } 662 }
397 function hover(type, item) 398 { 399 const id = getID(item); 400 if (!id) 401 return; 402 const hovered = $(".hover", this); 403 if (hovered) 404 hovered.classList.remove("hover"); 405 const option = $(`#${id}`, this); 406 option.classList.add("hover"); 407 this.label.setAttribute("aria-activedescendant", id); 408 const popup = this.popup; 409 // if it's the mouse moving, don't auto scroll (annoying) 410 if (type !== "mouse" && popup.scrollHeight > popup.clientHeight) 411 { 412 const scrollBottom = popup.clientHeight + popup.scrollTop; 413 const elementBottom = option.offsetTop + option.offsetHeight; 414 if (elementBottom > scrollBottom) 415 { 416 popup.scrollTop = elementBottom - popup.clientHeight; 417 } 418 else if (option.offsetTop < popup.scrollTop) 419 { 420 popup.scrollTop = option.offsetTop; 421 } 422 } 423 }
12 function sfHover() { 13 var ULs = document.getElementsByTagName("UL"); 14 var len = ULs.length; 15 for(var i=0;i
8 function updateHover(ev){ 9 hoverCoord = ev.latlng; 10 update(); 11 }
90 function setupHovers() { 91 $("span.token").hover( 92 function() { 93 var x = $(this); 94 var tokenOrder = x.attr('tokenorder'); 95 $('[tokenorder = ' + tokenOrder + ']').addClass("hover"); 96 }, 97 function() { 98 var x = $(this); 99 var tokenOrder = x.attr('tokenorder'); 100 $('[tokenorder = ' + tokenOrder + ']').removeClass("hover"); 101 } 102 ); 103 }
23 function _onMouseOver(link) { 24 $('#' + link.id).click(function (e) { 25 26 if (!$('#popup_result_div').is(":visible")) { 27 $("#popup_result_div").css({position:"absolute", left:e.pageX, top:e.pageY }); 28 $('#popup_result_div').show('slow'); 29 30 } 31 32 33 }); 34 35 }