jQuery Plugin To Increase The Clickable Area For Links hitMe - Download jQuery Plugin To Increase The Clickable Area For Links - hitMe

Download jQuery Plugin To Increase The Clickable Area For Links – hitMe

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin To Increase The Clickable Area For Links – hitMe, hope it will help you in programming stack.

jQuery Plugin To Increase The Clickable Area For Links hitMe - Download jQuery Plugin To Increase The Clickable Area For Links - hitMe
File Size: 6.45 KB
Views Total: 290
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

hitMe is a simple yet useful jQuery plugin used to make the entire container containing an anchor link clickable for better user experience.

How to use it:

1. Place both jQuery library and the jQuery hitMe plugin at the end of the html page.

1 <script src="//code.jquery.com/jquery-1.12.1.min.js"></script>
2 <script src="src/jquery.hitMe.js"></script>

2. Assumed that you have an article element which contains an anchor link.

1 <article>
2   <h2><a href="http://www.google.com">Title</a></h2>
3   <p>Description here <a href="http://www.<a href="https://www.jqueryscript.net/tags.php?/twitter/">twitter</a>.com">More...</a>
4   </p>
5 </article>

3. Calling the function will apply the first link to the article element.

1 $(function() {
2   $('article').hitMe();
3 });

4. You can also pass CSS or jQuery select(s) as a parameter to the hitMe() function.

1 $('article').hitMe(target);

This awesome jQuery plugin is developed by roelvangils. For more Advanced Usages, please check the demo page or visit the official website.

source : jqueryscript.net