-
AuthorPosts
-
June 14, 2015 at 4:09 pm #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,
AljoschaJune 16, 2015 at 5:33 am #459819Hi Aljoscha!
Can you post a link to the portfolio grid.
Best regards,
JosueJune 16, 2015 at 10:06 am #459924This reply has been marked as private.June 17, 2015 at 1:04 pm #460699Hey!
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!
ElliottJune 17, 2015 at 3:23 pm #460833Dear 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.
June 17, 2015 at 11:23 pm #461014Hey!
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,
JosueSeptember 6, 2015 at 5:45 pm #498914Thank you!
I’ve created a main.js in the child theme folder and it seems to work just fine!Best regards,
AljoschaSeptember 7, 2015 at 8:14 am #499085September 13, 2017 at 6:30 pm #851692This thread can be closed! Thanks again.
-
AuthorPosts
- The topic ‘Disable Image Fade in generally’ is closed to new replies.