I’m trying to get a list element to point to a URL.
For some reason, it does not link (because of the id=”mylink” inside a href).
The jQuery loads up an image map perfectly when I rollover the list item. No worries here. Simply turing to make my a href work…
Can some please let me know why the URL is not working?
<script>$(function() {
$('.map').maphilight();
fade: true,
$('#mylink').mouseover(function(e) {
$('#mapbox').mouseover();
}).mouseout(function(e) {
$('#mapbox').mouseout();
}).click(function(e) { e.preventDefault(); });
});</script>
The list item:
<li><a href="mylink/index.html" id="mylink">My Link</a></li><br />
.click(function(e) { e.preventDefault(); });You are telling it NOT to allow the browser to continue loading the href that the link points to.