Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #706863

    Hello guys.

    I have a tricky question :)

    I need to comment in avia.js the line :
    if(aviabodyclasses.indexOf(“avia-msie-7”) == -1) avia_responsive_menu();
    (i call the function myself in a custom file elsewhere).

    I could override the file avia.js but if i don’t want to override this whole file just for one line (for theme update issues…).
    Is there a magical way?
    Thank :)

    #707750

    Hey szed,

    Please use a child theme – http://kriesi.at/documentation/enfold/using-a-child-theme/ and please add following code to Functions.php file of your child theme

    function wp_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_print_scripts', 'wp_change_aviajs', 100 );

    and move modified file inside /js folder :)

    Best regards,
    Yigit

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