I’m trying to retrieve the hash value of the next link
HTML
<ul id="links">
<li><a href="index.php?#1"></a></li>
<li><a href="index.php?#2"></a></li>
<li><a href="index.php?#3"></a></li>
</ul>
JS
$('#links li a').click(function() {
var current_link = $(this).attr("href").substring(1);
var next_link = $(this).next().attr("href").substring(1);
});
The current_link works, but I can’t seem to retrieve the value of the link below. I think i’m missing an index() somewhere but i’m not exactly sure.
Thank you!
crazy demo