-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
can i init close the panel x_panel for default? #917
Comments
Hii @residente007 you can add the below script to initially close the x_panel. <script> $(document).ready(function() { // Store the content of .x_content elements before removing them $(".x_panel").each(function() { var content = $(this).find(".x_content").detach(); $(this).data("content", content); }); $(".collapse-link").on("click", function() { var panel = $(this).closest(".x_panel"), icon = $(this).find("i"), content = panel.find(".x_content"); if (content.length === 0) { // If .x_content does not exist, add it back content = panel.data("content"); panel.append(content); content.hide(); // Hide the content initially to prepare for the slide toggle } // Toggle the .x_content visibility content.stop(true, true).slideToggle(200, function() { if (!panel.attr("style")) { panel.css("height", "auto"); } else { panel.removeAttr("style"); } }); // Toggle the icon class icon.toggleClass("fa-chevron-down fa-chevron-up"); }); $(".close-link").click(function() { $(this).closest(".x_panel").remove(); }); }); </script> |
Hii @puikinsh please close this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can i init close the panel x_panel for default?
I mean. Keep closed when load or reload or refresh the page
How can i do it?
I have the HTML template
The text was updated successfully, but these errors were encountered: