WordPress.org

Ready to get started?Download WordPress

Forums

Thematic Superfish jQuery Conflict (2 posts)

  1. acrane
    Member
    Posted 1 year ago #

    Please, Please, can someone tell me how to write a jQuery snippet on a Thematic Child theme that doesn't get conflicted by the Superfish dropdowns?

    I've tried: replacing the $ with jQuery but it doesn't seem to be working. Below is my code in my functions:

    function my_in_head(){ 	?>
    
    	<script type="text/javascript">
    	//<![CDATA[
    
    	jQuery.noConflict();
    	jQuery(document).ready(function(jQuery) {
    		jQuery('.snips').mouseenter(function() {
    			jQuery(this).animate({paddingLeft: '5px', backgroundColor: "#C6C6C6"});
    			});
    		jQuery('.snips').mouseleave(function() {
    			jQuery(this).animate({paddingLeft: '0px', backgroundColor: "#AEAEAE"});
    			});
    	}); //end document ready functions
    
    	/* ]]> */
    	</script>
    
    <?php }
    add_action('wp_head', 'my_in_head');
  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    You ought to be checking your browser's console log to see what's up and whether there are any revealing error messages.

Topic Closed

This topic has been closed to new replies.

About this Topic