You can write nested <a> tag in your HTML page
- Supports AMD/CommonJS
Include the script (unless you are packaging scripts somehow else):
<link rel="stylesheet" href="/path/to/nestedanchor.css"/>
<script src="/path/to/nestedanchor.js"></script>
Do not include the script directly from GitHub (http://raw.github.com/...). The file is being served as text/plain and as such being blocked in Internet Explorer on Windows 7 for instance (because of the wrong MIME type). Bottom line: GitHub is not a CDN.
It can also be loaded as an AMD or CommonJS module.
Activate plugin
$(document).nestedanchor();
Create a link
<span class="link" data-href="http://google.com">Google</span>
Set a target
<span class="link" data-href="http://google.com" data-target="_blank">Google</span>
You can even make nested link tag(s)!
<span class="link" data-href="http://google.com" data-target="_blank">This link take you Google, but <span class="link" data-href="http://bing.com" data-target="_blank">this nested link</span> takes Bing.com</span>
Use your common sence! :-)