Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #25684

    Hi Caleb,

    Not in that same way no.




    Ok, do you know a simple jQuery string that could make the logo fade in on page load?

    I am not very good at jQuery yet.



    You can add the code to enfold/js/avia.js – replace



    $('#header_main strong.logo').fadeIn('slow');

    and insert following code into the quick css field to hide the logo:

    #header_main strong.logo{ display: none; }


    I am using a child theme to override the js file, but I don’t know how to override the avia.js file since it is in a sub-directory under the parent directory (themes/enfold/js/avia.js).

    I tried making a directory in my child theme, and copying the JS file into that directory (enfold-child/js/avia.js), but that didn’t work.

    I did try the jQuery in the parent files (before I tried overriding them with a child theme) and it worked, so thanks for that.


    In this case the child theme doesn’t add to or replace the parent file so the most straightforward way is to add it to the parent theme file.




    What happens when I update the theme? Sorry for all the questions, but I thought you could overwrite sub-directories with a child theme?



    If you don’t want to lose the avia.js when updating the theme. You can copy the actual avia.js on a js folder inside the child theme. Edit functions.php, find this code

    wp_register_script( 'avia-default', $template_url.'/js/avia.js', array('jquery'), 1, true );

    Replace it with:

    wp_register_script( 'avia-default', $child_theme_url.'/js/avia.js', array('jquery'), 1, true );



Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Add Animation to Logo’ is closed to new replies.