Alpine ignores events triggered by JQuery #2062
-
I just spent few hours solving strange issue. We use jQuery plugin to decorate number input fields with nice [+] and [-] buttons. These buttons changed value of input with x-model but Apline did not reacted to it. Apline ignored events triggered by jQuery. After some investigation I found out it was caused by some incompatibility of jQuery triggered events ( I just wonder if there is any know way how to solve issue without creating and maintaining custom versions of that jQuery plugin? What is the reason jQuery events cannot be listened for by Alpine? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
It's because jquery events are not standard ones, they are just a jQuery implementation to imitate the native event system. Alpine just use standard listeners under the hood (the one you could create with document.addEventListener).
|
Beta Was this translation helpful? Give feedback.
It's because jquery events are not standard ones, they are just a jQuery implementation to imitate the native event system. Alpine just use standard listeners under the hood (the one you could create with document.addEventListener).
Usually the options are: