FAQ Database Discussion Community


ThreeJS – smooth scaling object while mouseover

object,three.js,scale,onmouseover
another ThreeJS question: How can I make a hovered (intersected) object scale smooth to a defined size? My current code is INTERSECTED.scale.x *= 1.5; INTERSECTED.scale.y *= 1.5; but this only works like on/off. Edit: My Solution (with tweenJS) While mouseOver I scale up the element to 200% : function scaleUp(){...

ThreeJS – way to show one object by intersecting another

three.js,intersection,onmouseover
I try to write a ThreeJS interaction where the user hovers a sphere and a connected text object will show up. The problem is to show the connected text object with the intersected sphere so every sphere shows its own text. For now I only could show the same text...

Change image on mouse over in javascript

javascript,html,onmouseover
I'm building a webpag in html. The image must change when I mouse over a div, but it does nothing. Anyone any idea? <!doctype html> <html> <head> <meta charset ="UTF-8"/> <title>Oef 19.5</title> <link href="19_5.css" rel="stylesheet"/> <script> function kleuren(veld) { var tshirt = document.getElementsByClassName("shirt"); tshirt.src=veld.id+".jpg"; } </script> </head> <body> <h1>Pick a...

How do I get the Onmouseover method to apply universally to all links?

class,styling,highlighting,onmouseover
We're aware of that amazing trick which allows users to highlight a link. But, you must repeat it for each link. for example: a href="https://www.yahoo.com" Onclick="window.open(this.href); return false" onmouseout="this.style.color = '#0000ff';" onmouseover="this.style.color = '#e3FF85';" align="justify">Yahoo. But, I would like this code to apply to every link on the page. I've...

How to onmouseover swap image in php?

php,wordpress,image,onmouseover
I have this code in my wordpress template <a onclick="get_project_data(<?php echo get_the_ID(); ?>)"><img src="<?php echo wp_get_attachment_url( $logoimg_id ); ?>" onmouseover="this.src=\'<?php echo wp_get_attachment_url( $logoimg_id+b ); ?>';" onmouseout="this.src=\'<?php echo wp_get_attachment_url( $logoimg_id ); ?>';"/></a> But it doesn't work, I need to show a full colour image and a black and white with on...

Play song at onmouseover and stop song at onmouseout

javascript,onmouseover
I am working on a onmouseover to play a song for a school project. I already found code for onmouseover and onmouseout but with Alerts its still not working. If you can help me it would be great. Many thanks! document.getElementById("RockButton").onmouseover = function() { mouseOver() }; document.getElementById("RockButton").onmouseout = function() {...

Why is this working differently in firefox, chrome and IE?

css,table,centering,onmouseover
I just wanted to ask the following : Why does table behave in a strange way in different browsers? Is this behavior same with other tags??Even my data, though being repeatedly centered doesn't displays the way it should.Is something wrong with the way i used 'test-align'? (i have not found...

how to trigger an onmouseover event on element in javascript? [duplicate]

javascript,html,css,triggers,onmouseover
This question already has an answer here: How to trigger event in JavaScript? 4 answers As titled, how do I trigger an onmouseover event on element in javascript? please refer to Code Snippet. Instead of hovering over the big box, can I click on the small black box and...

Limiting 'onmouseover' to image's dimensions

javascript,html,css,onmouseover
I have a small .gif image of a question mark located on the following page: Home Page Unfortunately, the code I'm using doesn't limit the 'onmouseover' area for the question mark image. I.e., whenever you mouseover anything to the far left/right of the question mark .gif, you get the appropriate...

JavaScript Only Image Hover

javascript,external,onmouseover,onmouseout
This is purely for learning purposes; I know that CSS would be the preferred method for this situation. I know that in JavaScript, you can use inline event handling to hover over an image, like so: <img src="image.png" onMouseover="src='image2.png'" onMouseout="src='image.png'"> And I know you can install jQuery in your site,...

Onmouseover popup with a delay

javascript,jquery,ajax,onmouseover
On a forum is a user information popup. When you hover over the username, its displaying a popup with the user informations. I have to delay this a bit, because its anoying when always coming popups that fast. Popup link: $_uinfo_profile = '<a href="{PROFILE_URL}" onmouseover="show_popup(' . $user_id . ')" onmouseout="close_popup()">{USERNAME}</a>';...

ThreeJS - how to pick just one type of objects?

three.js,onmouseover,raycasting
I'm new to ThreeJS and I have an issue with picking objects by raycasting. I have created some spheres and some lines but only want to change the spheres on mouseover. I think I need to add some condition in the raycast code but I have no idea what... Here's...

A better way to use onmouseover, onmouseleave

javascript,onmouseover
How I can better make an use of onmouseover, onmouseleave and onmousemove in this JSFiddle file? http://jsfiddle.net/Insane96MCP/xznn7g3d/5/ You can see that I have: document.getElementById("button1").onmouseover = function(){ showToolTip(/*...*/); } document.getElementById("button1").onmouseleave = function(){ hideTooltip(/*...*/); } document.getElementById("button1").onmousemove = function(){ showTooltip(/*...*/); } document.getElementById("button2").onmouseover = function(){ showTooltip(/*...*/); } //And so on There's a better way...

multiple sounds on diffirent mouseovers

javascript,onmouseover
I am finding trouble with multiple mousovers with different sounds. trouble: when i do a mousover on Rockbutton it will play the song of Popaudio. Is there a better way or a simple solution for this? Many thanks! // Muziekje Rock --------------------------------------------------Muziekje rock document.getElementById("RockButton").onmouseout = function() {mouseOut()}; function mouseOver() {...

How to display two links over an Image onmouseover event?

html,css,onmouseover
I need to display two links to another page while hovering over the image as shown below I had achieved this using some CSS and Java script, But i found that this is not the efficient way to do it, especially my java script is causing some loops, what i...

javascript hide the rest of sections while onmouseover

javascript,html,hide,onmouseover
I have 4 <li> and I like them to become the trigger of linked images. I use javascript here and this project does not allow jQuery. Please refer to the code snippet. var children = document.querySelectorAll('#resistorContent > section[id]'); function showDetailContent(target) { // Simply loop over our children and ensure they...