flexslider not loading sometimes
-
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.
-
Try the below process,
Go to functions.php file
Go to enqueue section
Inplace of enqueue file, insidearray()writearray('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.
Thanksif ( ! 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.
ThanksI’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.
The topic ‘flexslider not loading sometimes’ is closed to new replies.
