• Resolved Hrabroslav

    (@hrabroslav)


    I have a problem on one of my WP portals with hueman theme with flexslider not loading sometimes.

    When it doesn’t load, there is “Uncaught TypeError: jQuery(…).flexslider is not a function” error in console.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Try the below process,
    Go to functions.php file
    Go to enqueue section
    Inplace of enqueue file, inside array() write array('jquery')

    If not work feel free to ask again.
    Please provide the link of your site if not work, i will do my best to solve it.
    Thanks

    Thread Starter Hrabroslav

    (@hrabroslav)

    if ( ! function_exists( 'alx_scripts' ) ) {
    
    	function alx_scripts() {
    		wp_enqueue_script( 'flexslider', get_template_directory_uri() . '/js/jquery.flexslider.min.js', array( 'jquery' ),'', false );
    		wp_enqueue_script( 'jplayer', get_template_directory_uri() . '/js/jquery.jplayer.min.js', array( 'jquery' ),'', true );
    		wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', array( 'jquery' ),'', true );
    		if ( is_singular() ) { wp_enqueue_script( 'sharrre', get_template_directory_uri() . '/js/jquery.sharrre.min.js', array( 'jquery' ),'', true ); }
    		if ( is_singular() && get_option( 'thread_comments' ) )	{ wp_enqueue_script( 'comment-reply' ); }
    	}  
    
    }
    add_action( 'wp_enqueue_scripts', 'alx_scripts' );

    This is the original function from functions.php which already has solution you provided used.

    My site is http://www.kd-sticna.si.

    Thank you for looking at my problem.

    I just checked your site in Chrome, IE and FF. Loaded fine in all three browsers. You might find something related in one of these posts.

    @hrabroslav I also checked your site, but it looks fine. No such errors mentioned by you found. I will check your site after some time too. If found i will try to help you out.
    Thanks

    Thread Starter Hrabroslav

    (@hrabroslav)

    I’m sorry for not closing the thread earier.

    I figured that EU Cookies plugin was the biggest trouble maker (even if on another WP with same plugins and theme it worked fine) and changed it for another one. Flexslider loads fine since then.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘flexslider not loading sometimes’ is closed to new replies.