Linked up is a simple jQuery plugin that allows a container element to act as an extension of a link within. In other words, clicking the “linked up” element will follow the first link found inside.
Examples
Place the following code in the <head>
of your XHTML document.
Note: For best performance, it is recommended that you combine all JavaScript files
below into a single minified file.
<script type="text/javascript" src="jquery-1.3.1.js"></script>
<script type="text/javascript" src="jquery.linked-up.js"></script>
The following markup should then be used in your <body>content
<p>
<a href="test">A link</a>
Clicking this paragraph will follow the link above.
<p>
Combined with this script (after the markup has loaded):
$('p').linkedUp();
This will result in a clickable, linked up p element.
Device independence (accessibility) is maintained, because the link itself is still a part of the tab order for the page and can be activated as usual in a device independent way.
Working example
A complete demonstration of the Linked up plugin is available.
Download
Linked up is licensed under the The GNU General Public License (GPL), by downloading and/or using it you are agreeing to abide by the terms of that license.
Package
Download the complete Linked up 0.1 example package (.zip)
Individual files
- jquery.linked-up.js 0.1 (2 kB)
- Dependencies
- Required: jQuery (tested with version 1.3.1)