jquery-anything-clickable

2.1.0 • Public • Published

jquery-anything-clickable

A jQuery plugin which makes anything clickable easily.

npm

How to install

$ npm install jquery-anything-clickable

And add your reference:

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

Or in es6

import { Clickable } from 'jquery-anything-clickable';

How to use

Create an element.

<p>
 
</p>

And change it like this.

<p data-href="https://www.aiursoft.com">
  
</p>

Init it:

new Clickable('data-href');

And when it starts, just click it!

You can even add data-href to

<hr>
<img>
<tr>
<td>
<video>
<div>
 
...
 
And anything!

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i jquery-anything-clickable

    Weekly Downloads

    8

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    10.3 kB

    Total Files

    9

    Last publish

    Collaborators

    • anduin2017