With help from you guys I now have a script that works like a charm.. The only thing I need now, is the script to open the URL in a new tab/window.
$(document).ready(function() {
$("#onskeliste li").click(
function()
{
window.location = $(this).attr("url");
return false;
});
$('#onskeliste li a').click(function(e) {
e.stopPropagation();
});
})(jQuery);
Can you help me with this?? 🙂
Instead of using
window.locationyou should usewindow.open()to open a new window (or tab) instead of loading the URL in the current one.Window open() Method