Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mihdan/dc187898fb0cf07ec487a890ca27540c to your computer and use it in GitHub Desktop.
Save mihdan/dc187898fb0cf07ec487a890ca27540c to your computer and use it in GitHub Desktop.
Раскрывает первый элемент виджета Elementor -> Toggle по умолчанию
( function ( $ ) {
$( function () {
/**
* Раскрывает первый элемент виджета Toggle по умолчанию.
*/
$( '.elementor-toggle-item:first-child' )
.children( '.elementor-tab-title' )
.addClass( 'elementor-active' )
.attr({
'aria-expanded': 'true',
tabindex: '0',
'aria-selected': 'true'
})
.end()
.children( '.elementor-tab-content' )
.addClass( 'elementor-active' )
.css( 'display', 'block' );
});
} )( window.jQuery );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment