I have a button which when clicked performs myFunction with two actions, i'd like it to perform the first action, wait for 2 seconds, then perform the action. This is the code so far:
function myFunction() {
document.getElementById('box1').style.display = "block"; $("#box2").data( "mmenu" ).close();
};
Thanks!