Replies: 3 comments 3 replies
-
You can use x-bind to bundle them into a single directive. |
Beta Was this translation helpful? Give feedback.
-
ok looking through the docs I think you are reffering to this: This looks promising, in this case instead of trying to add the directives to a class somehow like i suggested, I would be doing |
Beta Was this translation helpful? Give feedback.
-
ok so just going by the docs example, what I'm doing is very similar except they are doing a x-show, I'd like to bind a class instead. Let's say I'm trying to bind class hidden when open is true, I'm not sure how to adjust this line
I tried this, obviously not right, I'm unsure of the correct approach
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to apply a set of x-on events to all elements with the same class name. I think maybe
store
has something to do with this but I'm a bit confused at what I'm seeing in the docs.Essentially I have:
x-on:mouseenter="cursor = true"
x-on:mouseleave="cursor = false"
x-on:click="cursor = false"
And I want it applied to everything with the class
.cursor-shrink
What would be the best approach?
Beta Was this translation helpful? Give feedback.
All reactions