mysterious-toddler-20573
01/06/2021, 11:31 PMmysterious-toddler-20573
01/06/2021, 11:32 PMmysterious-toddler-20573
01/06/2021, 11:32 PMmysterious-toddler-20573
01/06/2021, 11:32 PMadamant-exabyte-92636
01/06/2021, 11:32 PMadamant-exabyte-92636
01/06/2021, 11:33 PMIntercooler.ready way of doing things?adamant-exabyte-92636
01/06/2021, 11:33 PMmysterious-toddler-20573
01/06/2021, 11:33 PMmysterious-toddler-20573
01/06/2021, 11:34 PMmysterious-toddler-20573
01/06/2021, 11:34 PMmysterious-toddler-20573
01/06/2021, 11:34 PMmysterious-toddler-20573
01/06/2021, 11:35 PMadamant-exabyte-92636
01/06/2021, 11:36 PMinit method, I essentially do lots of the equivalent of this:adamant-exabyte-92636
01/06/2021, 11:37 PMIntercooler.ready(function(rootContent) {
rootContent.find("#my-element").click(function() { doSomethingOnClick() });
});mysterious-toddler-20573
01/06/2021, 11:37 PMmysterious-toddler-20573
01/06/2021, 11:37 PMadamant-exabyte-92636
01/06/2021, 11:39 PMrootContent in the htmx case is not the element whose innerHTML is being swapped, it IS the innerHTML element/content itself... which means that "find" finds nothing... cause it should be finding on the parent of that elementadamant-exabyte-92636
01/06/2021, 11:39 PMmysterious-toddler-20573
01/06/2021, 11:40 PMmysterious-toddler-20573
01/06/2021, 11:40 PM#my-element is not in the new content?adamant-exabyte-92636
01/06/2021, 11:40 PMmysterious-toddler-20573
01/06/2021, 11:40 PM#my-element the root of the new content?adamant-exabyte-92636
01/06/2021, 11:40 PMmysterious-toddler-20573
01/06/2021, 11:40 PMmysterious-toddler-20573
01/06/2021, 11:41 PMadamant-exabyte-92636
01/06/2021, 11:41 PMmysterious-toddler-20573
01/06/2021, 11:41 PMmysterious-toddler-20573
01/06/2021, 11:41 PMadamant-exabyte-92636
01/06/2021, 11:41 PM