jQuery Plugin To Handle Click Outside Event - Clickout

jQuery Plugin To Handle Click Outside Event - Clickout
File Size: 11 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Clickout is a jQuery plugin used for handling click outside event of a specific element that is great for closing modal windows, off-canvas menus and etc.

How to use it:

1. To use this plugin, just include the main JavaScript file jquery-clickout.min.js after jQuery library:

<script src="//code.jquery.com/jquery.min.js"></script>
<script src="dist/jquery-clickout.min.js"></script>

2. Then bind the 'clickout' event to a specific element and we're done.

$('button').on('clickout', function (e) {
  alert('click outside button')
})

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