You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
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: