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 :)
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