disable-element
ExtensionThis extension disables an element during an htmx request, when configured on the element triggering the request.
<script src="https://unpkg.com/htmx.org/dist/ext/disable-element.js"></script>
<button hx-get="/whatever" hx-ext="disable-element" hx-disable-element="self">Click me</button>
<button hx-get="/whatever" hx-ext="disable-element" hx-disable-element="#to-disable">Click me</button>
<button id="to-disable">Watch me being disabled</button>
<button hx-get="/whatever" hx-ext="disable-element" hx-disable-element=".to-disable">Click me</button>
<button class="to-disable">Watch me being disabled</button>
<button class="to-disable">Watch me being disabled also</button>