Hello, I need a script to show a small image near the mouse when I put the mouse over a link. I don't want to disappear the link and show the image. I want to be both there. for example. when you put the mouse over this link www.dsfkjsdlkg.com I want to show a thumbnail image with me near the cursor. Thank you.
This is done in javascript, not PHP.. Don't know how though :/ Maybe some JS libraries have this function - look up jquery, scriptaculous, prototype or mootools or something Hope it helps
I thought they meant thumbnails which float above the link & move with the mouse position like I've seen used on some websites... Don't think it can be done with :hover though
You only need to get the mouse position, and then write the IMG tag in a hidden div. Using javascript place the hidden div next to mouse position. document.getElementById("mydiv").style.position="absolute"; document.getElementById("mydiv").style.top="200px"; See this example: http://www.businessbazee.com/ Click Search link in blue bar. That is "onclick", you need "onmouseover" Do a google search to get a code to "find mouse position with javascript". So many there. regards
I would prefer the solution proposed by JEET than the CSS one. If you really need to put the image on the onmouseover event at the cursor location and remove it when onmouseout then a DIV with the image inside (with display style parameter) is your best hope! Then you need to check the realtime position of the cursor and that might be tricky with different code for each browser.