crooked-camera-44777
07/13/2021, 4:46 PMmysterious-toddler-20573
07/13/2021, 5:21 PMcrooked-camera-44777
07/13/2021, 5:32 PMcrooked-camera-44777
07/13/2021, 5:33 PMmysterious-toddler-20573
07/13/2021, 5:39 PMhtml
<div id="div-1" class="class1">...</div>
and send down:
html
<div id="div-1" class="class2">...</div>
you can write a css transition between the two and it will show up during the swap. Maybe we should drop the default to 10ms? Anything under 100ms shouldn't be noticeable compared w/ most network latency, is my understanding. (nb. you can update it yourself using htmx.config.defaultSettleDelay https://htmx.org/api/#configmost-jelly-15242
07/13/2021, 5:40 PM<div id='d1' hx-get='/test' hx-swap='outerHTML settle:10ms'></div>mysterious-toddler-20573
07/13/2021, 5:41 PMmysterious-toddler-20573
07/13/2021, 5:41 PMcrooked-camera-44777
07/13/2021, 5:47 PMcrooked-camera-44777
07/13/2021, 5:47 PMmysterious-toddler-20573
07/13/2021, 5:49 PMcrooked-camera-44777
07/13/2021, 5:50 PMadventurous-insurance-23865
07/13/2021, 10:16 PMhx-select to the entire response? IE, a parent DOM element has an hx-select="#content", but for a child dom node I want to just use everything we get back?most-jelly-15242
07/13/2021, 10:28 PMhx-select="" in the child element.most-jelly-15242
07/13/2021, 10:29 PMjs
function maybeSelectFromResponse(elt, fragment) {
var selector = getClosestAttributeValue(elt, "hx-select");
if (selector) {
var newFragment = getDocument().createDocumentFragment();
forEach(fragment.querySelectorAll(selector), function (node) {
newFragment.appendChild(node);
});
fragment = newFragment;
}
return fragment;
}adventurous-insurance-23865
07/13/2021, 10:32 PMadventurous-insurance-23865
07/13/2021, 10:32 PMmysterious-toddler-20573
07/13/2021, 10:45 PMmysterious-toddler-20573
07/13/2021, 10:45 PMmysterious-toddler-20573
07/13/2021, 11:21 PMmysterious-toddler-20573
07/13/2021, 11:22 PMgorgeous-airport-54386
07/13/2021, 11:25 PMmysterious-toddler-20573
07/13/2021, 11:28 PMmysterious-toddler-20573
07/13/2021, 11:28 PMuser
07/13/2021, 11:55 PM/contacts/42/... and, I guess, should be /contacts/1/...gorgeous-airport-54386
07/13/2021, 11:59 PM>gorgeous-airport-54386
07/14/2021, 12:00 AMgorgeous-airport-54386
07/14/2021, 12:02 AMhtml
<article>
<p>Name: Joe Blow
<p>Email: joe@blow.com
<ul>
<li><a href="/contacts/42/edit">Edit</a>
<li><a href="/contacts/42/email">Email</a>
<li><a href="/contacts/42/archive">Archive</a>
</ul>
</article>mysterious-toddler-20573
07/14/2021, 12:37 AMdelightful-gigabyte-28308
07/14/2021, 3:50 AM