Pass a function as a value. #3744
trusktr
started this conversation in
3. Feature Ideas
Replies: 1 comment 2 replies
-
x-init="$el.position = blahblah" |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to do something like this, passing a function value:
but I can't seem to pass a function value. Specifically, it would need to be passed to the JS
rotation
property (not the attribute, seemsx-bind
is only for the attribute).Here's an example using Alpine.js to dynamically create a series of boxes, and then I apply that desired function with JavaScript (but the goal is to apply the function in the HTML instead of in JS):
https://codepen.io/trusktr/pen/poqEJqj?editors=1000
Beta Was this translation helpful? Give feedback.
All reactions