Within my web application, there is a list displaying options for the user. Each 'li' element within this list is clickable, allowing the user to navigate to their selected option. Additionally, every 'li' element contains two buttons - one for deleting and the other for editing. However, I am experiencing an issue where clicking on the edit or delete button also triggers the onclick event of the li element. How can I prevent this from happening?
<ul id="filters" class="nomargin">
<li class="item" data-username="blub" onclick="alert('li clicked')">
<span class="default-view">
<span class="title">id5</span>
<span class="control">
<button class="edit-btn" value="edit" onclick="alert('edit')"></button>
<button class="delete-btn" value="delete" onclick="alert('delete')"></button>
</span>
</span>
</li>
</ul>
To see a prototype illustrating this issue, you can view my jsfiddle here: http://jsfiddle.net/LkUn9/