Forum Moderators: not2easy

Message Too Old, No Replies

Control a DIV variable with javascript onmouseover?

         

neokio

9:15 am on Apr 14, 2006 (gmt 0)

10+ Year Member



Hey all! I'm new to this board, it looks the the best one out there so I'll be hangin around..

So... you can control CSS with onmouseover via

onmouseover="this.style.borderWidth='2px';
or whatever... but is there code to change the position of an existing <div>?

Specifically, I'd like to replace 40 lines of javascript rollover code with a really simple onmouseover call to "change the 'left' value of div ARROW (with an image inside it) to value 100 (from -1000)". Just move the arrow around onscreen. Make sense? This way I can have one image and one div for as many links as I want, with minimal code.

Looking forward to hearing your ideas!
~N

coopersita

4:40 pm on Apr 14, 2006 (gmt 0)

10+ Year Member



Why not onmouseover="this.style.left: 100px;"?

By the way, how come you didn't post this in the javascript forum?

neokio

5:24 pm on Apr 14, 2006 (gmt 0)

10+ Year Member



I guess I wasn't totally clear. I'd like to end up with a series of links, each controlling the position of a single DIV via javascript. Like a moving underline, positioned by the link's onmouseover.

And you're right! I'll try posting it there instead.. ;)

coopersita

7:18 pm on Apr 14, 2006 (gmt 0)

10+ Year Member



are you looking for something like suckerfish menus?