Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #538
    dan
    Participant

    I have added x-clock per documentation to avoid flickering of hidden elements:

    [x-cloak] { display: none !important; }

    <div x-data=”{ open: false }”>
    <button @click=”open = true”>Expand</button>

    <span x-show=”open”>
    Content…
    </span>
    </div>

    However the page still flickers.

    #539

    You forgot x-cloack on the element itself:

    <div x-data=”{ open: false }” x-cloak>
    <button @click=”open = true”>Expand</button>

    <span x-show=”open”>
    Content…
    </span>
    </div>

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.