Performant External / Internal Link Checker With jQuery
File Size: | 13.2 KB |
---|---|
Views Total: | 492 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
![Performant External / Internal Link Checker With jQuery](https://www.jqueryscript.net/images/Performant-External-Internal-Link-Checker-With-jQuery.jpg)
Yet another External Link checker plugin which automatically detects the external and internal links within your document and adds corresponding CSS classes to them.
How to use it:
1. Add jQuery library and the External Link Check jQuery plugin to your webpage.
<script src="//code.jquery.com/jquery.min.js"></script> <script src="jquery_external_link_checker.js"></script>
2. Call the function checkExternalLinks
on the a
tag and the plugin will do the rest.
$('a').checkExternalLinks();
3. By default, the plugin will add the class 'js-external-link' to the external links, and the class 'js-internal-link' to the internal links. You can modify the default CSS classes in the JavaScript as follow:
$('a').checkExternalLinks({ externalLinkClass: 'js-external-link', internalLinkClass: 'js-internal-link' });
4. Apply your own CSS styles to the external and internal links.
.js-internal-link { background: green; } .js-external-link { background: red; }
Change log:
2016-10-17
- Minor Cosmetic changes
This awesome jQuery plugin is developed by LubomirGeorgiev. For more Advanced Usages, please check the demo page or visit the official website.