Relative Content

Tag Archive for alpine.js

Can Alpine’s x-teleport reposition an element dynamically?

I have a video player which changes its parent based on media queries, i.e. in “small” mode it’s in one part of the layout, and in “large” mode it’s in another. To make sure the video keeps playing across resolution changes, I explicitly re-parent the video player rather than, say, creating a new one, hiding/showing two different players, etc.

Can Alpine’s x-teleport reposition an element dynamically?

I have a video player which changes its parent based on media queries, i.e. in “small” mode it’s in one part of the layout, and in “large” mode it’s in another. To make sure the video keeps playing across resolution changes, I explicitly re-parent the video player rather than, say, creating a new one, hiding/showing two different players, etc.

BladewindUI with Alpine JS

sorry if this is silly to ask but i haven’t found any solution to this question of mine. so the code below is i want the page to run something (in this case, just alert on change of select option). if it was normal html, it’ll be something like this

AlpineJS model not updating via jQuery ajax callback

I am trying to update a checkbox value tied to a AlipneJS data model based on the response of a jquery ajax call.
However it doesn’t seem to work when I try to update the data model for the checkbox in the jQuery callback method. It updates fine before the jquery call (the commented out line works fine).

alpinejs x-init not setting value

alpinejs x-init not setting value. it showing console.log value twice. firstly showing correct value but immediatly it showing null. why it rendering two times?