Jquery MouseOver

Hi Guys,

I have vertical slider in place using http://logicbox.net/jquery/simplyscroll

This works great how over I need to change some text ina div depending on where the scroller is

For example I am scrolling over a bottle and when the scroll hits the label I want to trigger an action

The way in which I am doing this now is using some mouseover code which works buit I need the mouse over hot spot from scroller to allow my custom mouse over to be triggered. I am guessing this all to do with the stacking of the divs


Here is my code



		<div class="big-bottle">
			<div id="hotcontain" style="position:absolute;">
				<div id="a1" style="background:red;" class="hotareas">
					Area 1
				</div>
				<div id="a2" style="background:green;" class="hotareas">
					Area 2
				</div>
				<div id="a3" style="background:pink;" class="hotareas">
					Area 3
				</div>

				<div id="a4" style="background:white;" class="hotareas">
					Area 4
				</div>
				<div id="a5" style="background:blue;" class="hotareas">
					Area 5
				</div>
			</div>
		</div>

Open in new window

$("#hotcontain").simplyScroll({
                  className: 'vert',
                  horizontal: false,
                  frameRate: 20,
                  speed: 5
            });
      
      
      
            $('#a1').mouseenter(function() {
              $('.g-txt').html('TEXT TO ADD FOR AREA 1');
            });
      
            $('#a2').mouseenter(function() {
                    $('.g-txt').html('TEXT TO ADD FOR AREA 2');
                  });
            
            $('#a3').mouseenter(function() {
                    $('.g-txt').html('TEXT TO ADD FOR AREA 3');
                  });


Open in new window


john_yourspaceAsked:
Who is Participating?
 
john_yourspaceAuthor Commented:
Hi guys,

Sorry if I am not clear


A simple example is this


I have three divs

A container div
A button div
A content div



The content div over laps the button div ie is stacked on top as it moves



My question / problem


The content div has a mouse over action (changes text of another div)

My button div also has a mouse over action ie move the content div vertically


As two separate pieces my mouse over works


My problem is when some one mouses over the content div which is coverd by the button div only the button action happens I need both to happen


So to clarify two divs on top of one another I need both mouse actions to trigger
0
 
Lukasz ChmielewskiCommented:
Could you post your code or at least tell us what is the problem when you hover the mouse on the div ? Does this do anything ?
0
 
chaitu chaituCommented:
0
 
john_yourspaceAuthor Commented:
figured it out my self,
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.