www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] jquery dropdown firefox bug

  1. #1
    Join Date
    Jun 2010
    Posts
    5

    resolved [RESOLVED] jquery dropdown firefox bug

    I am writing a simple script that blinds down a div to create a dropdown effect. its on .hover, however it doesnt work on firefox, works on chrome and ie. Its on this page: http://port2.ericwooley.com

    Its a simple page i made where thats really all thats happening. I've been playing around with it and it seems like an event problem. As long as i keep the mouse in there it restarts the animation as soon as its finished. creating a jerky dissapear to blind down again. Seems like firefox is calling that event over and over?

    If its unclear, please let me know, this has got me completely stumped. Its a pretty simple script

    Here is the js:
    Code:
    <script type="text/javascript">
    	function showContent(div){
    		 $('#'+div+' .drop_down_content').show('blind', 'slow');
    	}
    	function hideContent(div){
    		 $('#'+div+' .drop_down_content').hide('blind', 'fast');
    	}
    	function activate(div){
    		$('#'+div).hover(
    				function(){
    					showContent(div);
    				},
    				function(){
    					hideContent(div);
    				}
    		);
    	}
    	divs = new Array('right_drop_down', 'left_drop_down');
    	$(document).ready(function() {
    		$.each(
    			divs,
    			function(index, value){
    				activate(value);
    			}
    		
    		)
    	});
    </script>
    Here is one of the relevant divs:
    Code:
    <div id='right_drop_down' class='drop_down' >
            <div class='drop_down_content'> <br />
    			<i>Phone</i><br />
                (805) 234-7651<br /><br />
    
                <i>Email</i><br />
                5wooley4@gmail.com<br />
    
            </div>
            <div class='drop_down_tab'> Contact Me </div>
          </div>

  2. #2
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    You might want to look into hoverIntent instead of hover: http://cherne.net/brian/resources/jq...verIntent.html

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint] | twitter | linkedin | http://www.pascarello.com

  3. #3
    Join Date
    Jun 2010
    Posts
    5
    Worked like a charm, thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles