Suppose I have this:
<ul id="menu">
<li><a href="someplace">some text</a><li>
...
</ul>
I want to make every li
clickable so I need to extract the value of href
like this:
$('#menu li').click(function() {
var link_to = $(SELECTOR THAT I NEED).attr('href');
window.location = link_to;
});
what's the correct code for this? Is there a better way?