I need to call the jQuery function below without a button click. How to do that?
jQuery:
<script>
$("#nav").click(function(e) {
e.preventDefault();
$("#nav").toggleClass("active");
});
</script>
In pure JavaScript I would do it like the function below, but how to do it in jQuery?
function toggleWindow(){
//alert("OK");
}