Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #428780

    Hi,

    We are using the color section with a self hosted video background.
    It worked for a while but after an update the video stopped working.

    It says there’s a problem in the shortcode.js:

    _html5_loop: function( )
    {
    	this.player.options.loop = true;
    }, 

    *Uncaught TypeError: Cannot read property ‘options’ of undefined*

    What could be the problem and what have we done wrong?

    #429720

    Hi PageroAB!

    It works fine when Enfold is activated instead of your child theme. The problem is most likely in the customized copy of the avia.js file your using in the child theme. Create a new child theme and add your customizations in piece by piece to figure out what’s going on.

    Cheers!
    Elliott

    #430167

    I’ve added an unmodified version of avia.js to my child theme to check if it’s the code, and enqueues it like Josue is describing in post #360250,

    // Replace avia.js
    function change_aviajs() {
       wp_dequeue_script( 'avia-default' );
       wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );

    but still no luck. I’m wondering if it’s loading in the wrong sequence?
    Other functions are working correctly though, so this is abit of a headache.

    Cheers

    #430170

    I actually managed to solve this right now!
    I changed the “$in_footer” to false, as I was saying earlier that it might be loading in the wrong sequence.

    wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, false);
    }

    Is there any reason that I wouldn’t want to load this in the header?

    Cheers

    #430612

    Hey!

    There may be some other scripts that depend on it. You could try moving all of the other scripts around but it could get messy. I would just leave it in the header.

    Best regards,
    Elliott

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.