I want to get the handle of the currently clicked link in jquery. Suppose, I have a bunch of li a elements:
HTML
<ul id="navigation" class="main_menu">
<li><a href="#panel_home">Home</a></li>
<li><a href="#panel_story">Story</a></li>
<li><a href="#panel_mantra">Mantra</a></li>
<li><a href="#panel_showcase">Showcase</a></li>
<li><a href="#panel_experience">Experience Us</a></li>
</ul>
jquery
$(document).ready(function() {
$("#navigation").localScroll({
hash: false,
onAfter: function(e, anchor, $target) {
// some magic code here, to get the anchor element which was clicked
// how do I use the 'e', 'anchor' and '$target' parameter to get the anchor?
}
}
});
If you could just alert() the anchor text or href, I'll be on my way...
Please note: I don't want to set hash: true
for some reason.