I have a LI with some information, including some links. I would like jQuery to make LI interactive, but also remain links in LI.
Clickable function works. I just need links to work. NOTE. They work if you right-click and select "Open in a new tab."
HTML
<ul id="onskeliste">
<li url="http://www.dr.dk">Some info with links <a href="http://www.imerco.dk" target="_blank">Imerco</a></a>
</ul>
JQuery
$(document).ready(function() {
$("#onskeliste li").click(
function()
{
window.location = $(this).attr("url");
return false;
});
})(jQuery);
I found a simulated question here, but it doesn't seem to solve my problem.
jQuery DIV click, with bindings
Can you help me?: -)
Thanks in advance...
source
share