r</span> toggle = <span class="hljs-keyword">new</span> hx.Toggle(<span class="hljs-string">"#toggle"</span>)
toggle.on(<span class="hljs-string">'change'</span>, <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">value</span>) </span>{
  hx.notify.info(<span class="hljs-string">"Toggle value set to "</span> + value)
})

<span class="hljs-keyword">new</span> hx.Toggle(<span class="hljs-string">"#toggle2"</span>)</code></pre></div></div></div></div></div></div> <