Clickables 1.1
Clickables is a MooTools plugin that allows non-anchor items to clicked like standard links. The first anchor in the element will be used for the link URL.
Details
- Author
- David Walsh
- Current version
- 1.1
- GitHub
- darkwing/clickables
- Downloads
- 2806
- Category
- Interface
- Tags
- Report
- GitHub Issues
How to use
Clickables can be initialized at any time but is generally initialized at the top of the document during the page's normal load. There are no required arguments -- only options.
<div>
<ul class="block-list">
<li>Clicking this block will take you to <a href="http://davidwalsh.name">DavidWalsh.name</a></li>
<li>Clicking this block will take you to <a href="http://scriptandstyle.com">Script&Style.com</a>.</li>
<li>Clicking this block will take you to <a href="http://mootools.net">MooTools.net</a></li>
</ul>
</div>
Javascript
var clix = new dwClickables({
elements: $$('.block-list li'),
anchorToSpan: true
});
For specific usage and options, please read the documentation or visit http://davidwalsh.name/js/clickables
Discuss
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus