$(document).ready(function(){
$(".menu").on('click', 'li', function () {
$(this).css('background-color', '#000000');
});
});
</script>
<ul class="menu">
<li onclick="window.location.href='start.php'">Start</li>
<li onclick="window.location.href='event.php'">event</li>
<li onclick="window.location.href='event_list.php'">event list</li>
<li onclick="window.location.href='black_list.php'">black list</li>
<li onclick="window.location.href='logout.php'">logout</li>
</ul>
Attempting to modify the style of a clicked li element individually. Struggling to get it to work, any suggestions?