virgiliud / gutenberg-animated-blocks

A WordPress Gutenberg plugin for adding scroll based animations to blocks.
3 stars 2 forks source link

Change jquery to vanillajs #enhancement #1

Open MichalS098 opened 5 months ago

MichalS098 commented 5 months ago

Hey, i think that changing jquery to vanilla js and reducing dependencies will be a nice idea, you could use intersectionObservers to listen if element is in viewport instead of using scrollClass jquery plugin, because not every one is including jquery in his wp site. Btw i really appreciate your work for doing the other Gutenberg slider plugin:).

virgiliud commented 5 months ago

Hello @MichalS098! Thank you for your suggestion! You are right. This plugin is overdue for an update. jQuery should be phased out since everything can be accomplished with vanilla JS. ScrollClass.js is a utility that I also built and I actually updated it to use vanilla JS but haven't had the time to apply these changes to Animated Blocks. As this plugin is open source, contributions are welcome until I can find the time to make these updates myself.