-1

I was hoping someone could help with this. I want to change the class of one div from #ron.front to #ron.upperLeft1.

  • When the mouse enters a div .toggle1, then have it change to #ron.upperFull.

  • When the mouse leaves .toggle1 and enters div .toggle2 (which is inside .toggle1).

The effect I'm trying to create is when the mouse enters the outside box Ron's eyes start to move, then when the mouse enters the inside box his eyes are fully to towards the box.

Here is my own attemt to get the outside upper left box working. http://emiwip.com/rb/test.html

(Don't laugh too hard, I'm no coder, but I'm trying to learn.)

Kevin Cittadini
  • 1,449
  • 1
  • 21
  • 30
user2636033
  • 23
  • 1
  • 6

1 Answers1

0

You can use jQuery Mouse Events and .toggleClass() to accomplish this.

For example:

$( ".toggle1" ).mouseenter(function() {
  $('#ron.front').toggleClass('#ron.upperLeft1');
});

When your mouse goes into "div.toggle1", #ron.front's class will change to ".upperLeft1"

szk5
  • 3
  • 1
  • It didn't work. I am using different name than I put in the original question. Here's the code I put ... – user2636033 Mar 04 '14 at 20:53