Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2012
    Posts
    137
    Thanks
    1
    Thanked 1 Time in 1 Post

    Why won't Chrome recognize these jQuery event listeners

    This works fine in IE and FF without any errors or warnings. Chrome does nothing, again no errors thrown. Is Chrome sensitive to jQuery?

    Code:
    <ul>
      <li>
        	(U) Spiral 1.5: <a class="glossaryLink" href="#">SCCVI</a> and <a class="glossaryLink" href="#">SCRI</a>  </li>
      <li> (U) Spiral 2:  <a class="glossaryLink" href="#">HBSS</a>  </li>
    </ul>
    Code:
    	$(document).ready(function(){
    		alert("In the setGlossLinkListeners function.");
    		$('a.glossaryLink').on('click',function(event){
    			alert("In the click.");
    			event.preventDefault();
    			showHideGlossary();
    		});
    	
    	$('a.glossaryLink').on('mouseover',function(event){
    			alert("You hovered.");
    		});
    	});

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,980
    Thanks
    56
    Thanked 557 Times in 554 Posts
    works fine in Chrome 22.

    must be something else.


  •  

    Posting Permissions

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