Please have a look at the following code:
<HTML>
<HEAD>
<script src=//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js type=text/javascript></script>
<SCRIPT type=text/javascript>
function test(target) { alert(target.nodeName); }
</SCRIPT>
</HEAD>
<BODY>
<DIV>
<ul>
<li onclick=test(this)>This is fair</li>
<li onclick=test(this)>No its not</li>
<li onclick=test(this)>Why not</li>
<li onclick=test(this)>Becoz...</li>
</ul>
</DIV>
</BODY>
</HTML>
The function test receives target (li node) as an argument.
Now, can I somehow convert this variable to jQuery $(this)
or $(e.target)
or any other jQuery variable to so that I could traverse the document using the jQuery way?