Toggle Show Hide on Client in Liveview: Revision history

Jump to: navigation, search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

30 July 2023

  • curprev 05:1705:17, 30 July 2023Admin talk contribs 326 bytes +326 Created page with "This is a working example: <source> defmodule AppWeb.PageLive do use AppWeb, :live_view def mount(_params, _session, socket) do {:ok, socket} end def render(assigns) do ~H""" <div phx-click={JS.toggle(to: "#item")} > CLICK ME </div> <div id="item"> hi there </div> """ end end </source>"