refined-waiter-90422
11/24/2022, 7:15 AMrefined-waiter-90422
11/24/2022, 7:16 AMorange-nail-40296
11/24/2022, 7:27 AM.mode html 😂loud-shampoo-68610
11/24/2022, 7:28 AMorange-nail-40296
11/24/2022, 7:53 AMboundless-leather-51644
11/24/2022, 4:37 PMboundless-leather-51644
11/24/2022, 4:38 PMHX-Current-URL from a HTML Form page ?some-airline-73512
11/24/2022, 4:51 PMapplescript
hx-vals='js:{"width":event.width}'some-airline-73512
11/24/2022, 4:52 PMapplescript
script="on mutation send resize(width: event.target.style.width)"ripe-action-67367
11/24/2022, 5:11 PMripe-action-67367
11/24/2022, 5:12 PMripe-action-67367
11/24/2022, 5:12 PMsome-airline-73512
11/24/2022, 5:12 PMripe-action-67367
11/24/2022, 5:12 PMripe-action-67367
11/24/2022, 5:18 PMhtml
<script src="https://demo.htmx.org"></script>
<button hx-get="/foo" hx-trigger="resize" hx-vals='js:{"el":event.detail.el}' hx-target="#out" _="on click send resize(el: event.target.tagName)">send</button>
<output id="out"></output>
<template url="/foo">alsdfkj ${el}</template>ripe-action-67367
11/24/2022, 5:19 PMripe-action-67367
11/24/2022, 5:19 PMripe-action-67367
11/24/2022, 5:20 PMsome-airline-73512
11/24/2022, 5:20 PMsome-airline-73512
11/24/2022, 5:20 PMboundless-leather-51644
11/24/2022, 5:33 PMboundless-leather-51644
11/24/2022, 5:42 PMedit button in a screen
<li class="list-inline-item">
<button class="btn btn-success btn-sm rounded-2" type="button"
title="Edit"
href="/credentials/credential/{credential.id}"
hx-get="/credentials/credential/{credential.id}"
hx-replace-url="/credentials/new"
hx-push-url="false"
hx-swap="outerHTML"
hx-target="#base">Edit</button>
</li>
containing a list of items. The beginning of the HTML page includes a <div id="base" that I use to replace using hx-swap=outerHTML the content (= HTML Form content) returned from a HTTP Get. Visually, I see the form with the fields to be edited witin my browser but If I look to the source (= HTML Page source), the HTML that I got is the HTML of the screen including the list of the items and not he Form.
What should I do to get the proper HTML ?boundless-leather-51644
11/24/2022, 5:55 PMhx-push-url="false" -> hx-push-url="true"boundless-leather-51644
11/24/2022, 9:28 PMmysterious-toddler-20573
11/24/2022, 9:32 PMthankful-apartment-66679
11/25/2022, 3:23 AMfresh-lighter-53021
11/25/2022, 6:48 AMslick by kenwheeler for a carousel in a django school project. Currently i am trying to implement an infinite scroll and i am able to do so but when new contents are added to they are not 'carouseled'. I know i need to initialize slick again using htmx.onLoad but it didn't worked.
So far i did this
htmx.onLoad(function(document) {
$('.post-meta').slick({
dots: true,
infinite: true,
speed: 300,
slidesToShow: 1,
adaptiveHeight: true
});
})fresh-lighter-53021
11/25/2022, 6:48 AMfresh-lighter-53021
11/25/2022, 6:48 AMfreezing-waitress-26396
11/25/2022, 6:53 AM$('parent-selector').on('event-name','child-selector', function() {
// Statement
});