Hello,
I am currently working on modifying particular script I have in place. Specifically, I would like to transition the "open" (services_button) and "close" (services__cancel) buttons into a singular toggle element. Here is the script that I am attmepting to modify. Thank You in advance for the assistance.
<script>
(function() {
[].slice.call( document.querySelectorAll( '.services' ) ).forEach( function( el ) {
var openCtrl = el.querySelector( '.services_button' ),
closeCtrls = el.querySelectorAll( '.services__cancel' );
openCtrl.addEventListener( 'click', function(ev) {
ev.preventDefault();
classie.add( el, 'services--active' );
} );
[].slice.call( closeCtrls ).forEach( function( ctrl ) {
ctrl.addEventListener( 'click', function() {
classie.remove( el, 'services--active' );
} );
} );
} );
})();
</script>