Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter schanzentroll

    (@schanzentroll)

    I have now used firebug for debugging the conflict between my theme and the plugin. It says:

    TypeError: jQuery(...).smoothScroll is not a function
    jQuery('a.top').smoothScroll();
    jQuery(document).ready(function() {
    jQuery('a.top').smoothScroll();
    jQuery('a.share-btn').click(function() {
    jQuery.smoothScroll({
    scrollElement: jQuery('.share'),
    scrollTarget: '#'
    });
    return false;
    });

    Have you got any suggestions? It’s the Audio-Plugin that causes the error, I think. Maybe there is a wordaround for it?

    check and see if you already have jquery loaded. I had the same type error/conflict when I installed this plugin so I commented out the author’s include statement for his jquery-1.7 file in the plugins directory, in the file ‘html5-jquery-audio-player/index.php’.
    Just search for jquery and yu should find the line im talking about.

    Plugin Author Maeve Lander

    (@enigmaweb)

    See point 5 in the FAQs please

    Thread Starter schanzentroll

    (@schanzentroll)

    @devincox: There is no index.php. With ‘html5-jquery-audio-player/index.php’ you mean the “plugin.php”, right?
    Where should I commented out the code?

    function pro_scripts_method() {
        wp_deregister_script( 'hmp-jquery' );
    	wp_register_script( 'hmp-jquery', "http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js");
        wp_enqueue_script( 'hmp-jquery' );
    
    	wp_deregister_script( 'drag-jquery' );
    	wp_register_script( 'drag-jquery', plugin_dir_url( __FILE__ )."/player/js/jquery-ui-1.7.1.custom.min.js");
        wp_enqueue_script( 'drag-jquery' );
    
    	wp_register_style( 'hmp-style', plugin_dir_url( __FILE__ )."/includes/css/hmp-style.css");
        wp_enqueue_style( 'hmp-style' );
    }

    @enigmaweb: I read the article by Chris Coyier and looked the code in the themes header,php. It’s already there:

    <?php
    	wp_enqueue_script('jquery');
    	if ( is_singular() && get_option( 'thread_comments' ) )
    	wp_enqueue_script( 'comment-reply' );
    	wp_head();
    ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘JS-Conflict with mobile menu’ is closed to new replies.