Make Any Elements Clickable With A Data Attribute - jQuery anything-clickable

File Size: 39.1 KB
Views Total: 542
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Make Any Elements Clickable With A Data Attribute - jQuery anything-clickable

anything-clickable is a small and cross-browser jQuery plugin which makes any elements (e.g. images, videos, table cells, etc) clickable with just an HTML data attribute.

Ideal for expanding the clickable area of your element to improve the user experience.

See also:

How to use it:

1. Download and put the minified version of the jQuery anything-clickable plugin after jQuery.

<script src="" 
<script src="./dist/jquery-anything-clickable.min.js"></script>

2. Initialize the plugin.

new Clickable('data-href');

3. Add the data-href attribute to your elements and specify the URL as follows:

<button data-href="">Click me</button>

<img data-href="" src="1.jpg">

<video width="400" controls data-href="">
  <source src="mov_bbb.mp4" type="video/mp4">
  <source src="mov_bbb.ogg" type="video/ogg">
  Your browser does not support HTML5 video.

<table class="table" data-href="">
      <th scope="col">#</th>
      <th scope="col">First</th>
      <th scope="col">Last</th>
      <th scope="col">Handle</th>
      <th scope="row">1</th>
      <td data-href="">Mark</td>
      <th scope="row">2</th>
      <th scope="row">3</th>
      <td>the Bird</td>
      <td data-href="">@twitter</td>



v2.0.0 (2020-05-17)

  • Bugfixed

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