# Last item clicked

**URL:** <https://forum.kirupa.com/t/last-item-clicked/267759>\
**Category:** Uncategorized\
**Created:** [August 5, 2008, 1:21pm UTC](https://forum.kirupa.com/t/last-item-clicked/267759 "2008-08-05T13:21:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Navarone](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Navarone](https://forum.kirupa.com/u/Navarone)\
**Post date:** [August 5, 2008, 1:21pm UTC](https://forum.kirupa.com/t/last-item-clicked/267759/1 "2008-08-05T13:21:59Z")

</div>

I have a menu and I need to know the last menu item clicked. So if I click on menu item 1 and then click on menu item 2, I need to know that menu item 1 was the last item clicked. Is there a simple javascript function that will do this? 😑
