Link Within A Link?
i'm using an iframe within my html, loading an image gallery i found from the web. Each img has an information bar you can click on, and when the bar opens it provides viewers with
Solution 1:
.link {
position: relative;
}
.link span {
position: absolute;
}
<a class="link" href="http://cnn.com">
<imgsrc="http://placehold.it/150x100"data-big=""data-title="test title"data-description="test description"/><spandata-url="http://npr.org">Other link</span>
</a>
$('.link span').click(function (e) {
e.preventDefault();
window.location = $(this).attr('data-url');
});
Note that I used jQuery for this example.
Post a Comment for "Link Within A Link?"