jquery.clickable
v2.0.1
Published
Designed to make other elements clickable/tapable/pressable using its sibling or child links!
Downloads
1,690
Readme
jQuery.clickable
Designed to make other elements clickable/tapable/pressable using its sibling or child links!
Usage
To get started you can either:
- Clone the repo:
git clone https://github.com/lawlesscreation/jquery.clickable.git
- Or install with Bower:
bower install jquery.clickable
Then it's just a case of adding required scripts in your page, best at the bottom:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="jquery.clickable.min.js"></script>
Options & defaults
Examples
Link target
$(function(){
$('#clickable-box').find('.box').jqueryClickable();
});
Link image
$(function(){
$('#clickable-image').find('.box').jqueryClickable({
clickableChild : 'img'
});
});
Link image from heading
$(function(){
$('#clickable-image-from-heading').find('.box').jqueryClickable({
clickableChild : 'img',
selectLink : 'h4'
});
});
Development
You will need node.js before you get started, then:
$ npm install
#=> will install all required node packages
Then simply run either the watcher or build task:
$ grunt
#=> Running "watch" task
#=> Waiting...
or
$ grunt build
#=> Done, without errors.
Copyright © 2013 @lawlesscreation
Licensed under MIT
TODO
- Additional callbacks;
- Finish writing Jasmine test specs.