Thanks in advance for helping. I am new to JavaScript so i think i'm doing something basic incorrectly. I would like 'toggleclass' between class '.fa' and class '.fa-bars fa-times' to take 1 second after i click on class '.ubermenu-responsive-toggle'
The toggle between '.fa' and '.fa-bar fa times' after clicking on '.ubermenu-responsive-toggle' works. I just can't get the timeset delay down. I keep getting JavaScript errors in Chrome's inspector. I will put my best guess below. I'm sure this is something simple but, like I said, JavaScript is new territory for me.
Thanks again for your help.
jQuery(document).ready(function($) {
$( '.ubermenu-responsive-toggle' ).on( 'click touchend' , setTimeout(function(){
jQuery( this ).find( '.fa' ).toggleClass( 'fa-bars fa-times' );
}, 1000));
});
setTimeoutis working properly. See Demo