jQuery Plugin To Add Target Blank To External links - addTargetBlank
File Size: | 3.48 |
---|---|
Views Total: | 543 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
addTargetBlank is an extremely simple jQuery plugin that automatically adds target="_blank" attribute to external links of your web page. With this plugin, all the external links on your website will be opened in a new tab/window.
How to use it:
1. Include jQuery library and jQuery addTargetBlank plugin on the page
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> <script src="jquery.addTargetBlank.js"></script>
2. Call the plugin
<script> $(document).ready(function($) { $('a').addTargetBlank(); }); </script>
This awesome jQuery plugin is developed by mimiz. For more Advanced Usages, please check the demo page or visit the official website.