I have a some custom JQuery code that listen to events and add some classes to form elements (focus, blur, odd/even, etc). Nothing big but I would like not to re-writte all this logic in VueJS since all the website use only JQuery and 1 page uses VueJS for a complex form.
I wrote a Directive to launch the JQuery code on new VueJS elements and it's working. But some VueJS code (vee-validate
directive plugin in my case but it can be any VueJS code) changes the classes using v-bind:class
. So it erase the classes sets by JQuery, it doesn't add its classes it replace them... Is there any way to play nicely with classes from VueJS and JQuery/Javascript ? Make JQuery aware of existing classes or something.
Thanks