lets say i have a list of links:
<a id="home" href="#"> home link </a><br/>
<a id="list1" href="#"> some text1 </a><br/>
<a id="list2" href="#"> some text2 </a><br/>
<a id="list3"> href="#"> some text3 </a><br/>
<a id="list4" href="#"> some text4 </a><br/
<a id="list5" href="#"> some text5 </a><br/>
<a id="list sails" href="#"> sails link </a><br/>
and if some list link is clicked i get an alert with its text
i wrote a script but it isnt right, it looks like this
function lunch(){
alert( $(this).text()) }
for
<a id="listn" href="#" onclick="lunch()"> some text5 </a><br/>
how to do this on jquery or just javascript?