mouseover link image appears next to cursor

Discussion in 'Javascript' started by Woody, Feb 24, 2005.

  1. Woody

    Woody Guest

    i need to know how to make a preloaded image appear next to the cursor
    when i mouseover a link...

    can anyone help me?

    it is preferred, if you can, that maybe a table appears, next to the
    cursor, with three or so images in the table...

    any suggestion or links are much appreciated!!

    thanks guys!

    -woody
     
    Woody, Feb 24, 2005
    #1
    1. Advertising

  2. Woody

    Woody Guest

    well, i feel let down :(
    i found it eventually.
    here it is for those of you who had no idea what i was asking about and
    for those who knew what i was asking about just didn't know how to help
    AND for those of you who might actually want to use this cool feature.


    var IE = document.all?true:false

    if (!IE) document.captureEvents(Event.MOUSEMOVE)

    document.onmousemove = getMouseXY;

    var tempX = 0
    var tempY = 0

    function getMouseXY(e) {
    if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop}
    else { // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY}
    if (tempX < 0){tempX = 0}
    if (tempY < 0){tempY = 0}}

    function follower(s, e){
    var followX = tempX - 190;
    var followY = tempY + 25;
    e.style.left = followX;
    e.style.top = followY;
    s.onmouseover = function(){
    e.style.display = "";}
    s.onmouseout = function(){
    e.style.display = "none";}}

    thanks anywho!
    -woody
     
    Woody, Mar 10, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VG9tYXMgS2VwaWM=?=

    Changing DEFAULT cursor to WAIT cursor in ASP

    =?Utf-8?B?VG9tYXMgS2VwaWM=?=, Apr 5, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,323
    Bruce Barker
    Apr 5, 2005
  2. Deniz Bahar
    Replies:
    2
    Views:
    476
    Andrey Tarasevich
    Mar 9, 2005
  3. dmaziuk
    Replies:
    3
    Views:
    581
    Chris Gonnerman
    Jan 25, 2011
  4. Mrmaster Mrmaster
    Replies:
    9
    Views:
    89
    Ben Giddings
    Sep 19, 2009
  5. Simon Wigzell

    Custom cursor on mouseover of mapped link

    Simon Wigzell, Mar 3, 2005, in forum: Javascript
    Replies:
    3
    Views:
    148
    Danny@Kendal
    Mar 4, 2005
Loading...

Share This Page