.is
alert only when third li is clicked
by Dipak1991
HTML
<ul>
<li>list item 1</li>
<li>list item 2</li>
<li>list item 3</li>
</ul>
CSS
.highlighted {
background: #3c763d;
}
JavaScript
$(document).on('click', function(event) {
if ($(event.target).is($('li:eq(2)'))) {
alert('Third Umpire Says - Not out');
}
})