How to add a function in script, that would be when you click on one of the menu items, it was?

<nav class="clearfix"> 
 <ul class="clearfix">
 <li class="top12"><a href="#header">Who are we?</a></li>
 the <li><a href="#bl2">Attachments<br> equipment</a></li>
 <li class="top12"><a href="#bl7-2">Guarantee</a></li>
 the <li><a href="#bl9">Common<br> issues</a></li>
 </ul> 
 <a href="#" id="pull">Menu </a> 
 </nav> 
the <script>
 $(function() {
 var pull = $('#pull');
 menu = $('nav ul');
 menuHeight = menu.height();

 $(pull).on('click', function(e) {
e.preventDefault();
menu.slideToggle();
});

$(window).resize(function(){
 var w = $(window).width();
 if(w > 320 && menu.is(':hidden')) {
menu.removeAttr('style');
}
});
});
 </script>
July 9th 19 at 10:04

Find more questions by tags JavaScriptjQuery