htmlstreamofficial / preline

Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
https://preline.co
Other
4.57k stars 286 forks source link

Initialize preline JS components in a page displayed with ajax #231

Closed lethunder closed 5 months ago

lethunder commented 8 months ago

Discussed in https://github.com/htmlstreamofficial/preline/discussions/208

Originally posted by **lethunder** December 9, 2023 Hello guys, all preline js components like tabs inside a page i hide and show with ajax and append to DOM are no more working. How do i initialize preline in jquery on ajax:success Exemple code $(document).on('ajax:success', ".display-in-offcanvas-js", function (event) { var detail = event.detail; var data = detail[0].body.innerHTML, status = detail[1], xhr = detail[2]; $(".application-offcanvas-js .content").html(data); }); data contains html with preline js components
nocodelab commented 8 months ago

Hi, did you solve this issue?

lethunder commented 8 months ago

hey, nope

lethunder commented 7 months ago

Hello guys, any answer?

jahaganiev commented 5 months ago

Hey @lethunder - we've added an example here https://preline.co/docs/preline-javascript.html