We cannot edit the code output to add in data-aos attribute
So how could we use this without data-aos? Normally these things can target elements by class or ID.
Thanks
Same issue here.
Tried to add attributes with jquery, but it doesn't work. Attributes get injected in the elements, but the animation is not working.
Same here. After injecting with jQuery in the document.ready event
jQuery( document ).ready(function() {
jQuery('.animate').find('h1,h2,h3,h4,h5,p,ul,a').attr('data-aos', 'fade-up');
I reinit AOS in the window.load event:
jQuery( window ).load(function() {
AOS.refreshHard();
That solves the problem for me.
Peter
@selfpubservice Thanks for the snippet, it's helped me incorporate the plugin into a CMS environment. It would be great if we could pass in a class to initialise the plugin against rather than the data attributes as default functionality at some point in the future.
Most helpful comment
@selfpubservice Thanks for the snippet, it's helped me incorporate the plugin into a CMS environment. It would be great if we could pass in a class to initialise the plugin against rather than the data attributes as default functionality at some point in the future.