Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
lethunder opened this issue Dec 28, 2023 Discussed in #208 · 4 comments
Closed

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

lethunder opened this issue Dec 28, 2023 Discussed in #208 · 4 comments

Comments

@lethunder
Copy link

Discussed in #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
Copy link

Hi, did you solve this issue?

@lethunder
Copy link
Author

hey,
nope

@lethunder
Copy link
Author

Hello guys,
any answer?

@jahaganiev
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants