Using 'this' with jQuery
by kingkool68
HTML
<ol>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ol>
CSS
ol {
padding-left:30px;
}
li {
list-style-type:decimal;
}
JavaScript
$('li').click(function() {
alert( $(this).text() );
});