Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #458933

    Hey,

    even though your theme is very slick, a client asks for images to be loaded instanstly and have no fade in effect. I looked at this issue some time ago but cannot find the support thread I then found on the issue.

    It’s especially the images used in the Portfolio Grid, that have a fade in effect I want to get rid off. There is a post on this topic that refers to the avia.js. Is this the right place to do the modification? If so I’d probably would need to alter that after every udgrade of the theme – or is there a way to include custom JS into the theme via a child theme?

    Best regards,
    Aljoscha

    #459819

    Hi Aljoscha!

    Can you post a link to the portfolio grid.

    Best regards,
    Josue

    #459924
    This reply has been marked as private.
    #460699

    Hey!

    You could try doing this, https://kriesi.at/support/topic/use-avia-js-in-child-theme/#post-230498, to be able to copy the file to your child theme and edit it there.

    Cheers!
    Elliott

    #460833

    Dear Elliott,

    thank you for pointing this out. I have made all the changes and the fade in is now set to 0ms. Still, there is only one issue I’m not yet clear about. As I want to only alter one issue within the avia.js I’m not sure if it is wise to ‘oursource’ the whole avia.js into the child theme as I have done now. Could I also just override this one issue like with using the function.php for adding a js function? The avia.js file might get updated with future theme upgrades and I might miss out on some of the changes or even run into problems if bigger parts of avia.js change.

    Especially as I want to have my client running updates on the site himself and not having to look into everthing working all the time.

    Thank you for your help, which has been absolutely great so far!
    Aljoscha

    • This reply was modified 9 years, 6 months ago by Aljoscha23.
    #461014

    Hey!

    1. Put this in your child theme functions.php:

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

    2. Create a main.js file in your child theme directory (inside a js folder).

    3. Place avia_iso_sort function and modify it there, like this.

    If you do this correctly child avia_iso_sort will overwrite the parent one.

    Regards,
    Josue

    #498914

    Thank you!
    I’ve created a main.js in the child theme folder and it seems to work just fine!

    Best regards,
    Aljoscha

    #499085

    Hi,

    Great, glad we could help :-)

    Regards,
    Rikard

    #851692

    This thread can be closed! Thanks again.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Disable Image Fade in generally’ is closed to new replies.