Simplify accordion implementation for better reliability
This commit is contained in:
@ -743,7 +743,6 @@ function wp_allstars_settings_page() {
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
// Initialize accordion functionality
|
||||
function initAccordion() {
|
||||
$('.wp-allstars-expand-settings').each(function() {
|
||||
var $button = $(this);
|
||||
var $panel = $button.closest('.wp-allstars-toggle').find('.wp-allstars-toggle-settings');
|
||||
@ -756,7 +755,7 @@ function wp_allstars_settings_page() {
|
||||
.toggleClass('dashicons-arrow-down-alt2', !isExpanded);
|
||||
|
||||
// Handle click events
|
||||
$button.off('click').on('click', function(e) {
|
||||
$button.on('click', function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
@ -771,10 +770,6 @@ function wp_allstars_settings_page() {
|
||||
$panel.slideToggle(200);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Initialize on page load
|
||||
initAccordion();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user