Add Favicons To External Links Using jQuery - faviconize
| File Size: | 4.62 KB |
|---|---|
| Views Total: | 516 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
faviconize is a super small jQuery plugin that adds favicons to external links on your webpage, with a fallback to a specific image when there's no favicon.
See also:
How to use it:
1. Add the faviconize-min.js script to the webpage, after you've added jQuery library.
<script src="//code.jquery.com/jquery.min.js"></script> <script src="faviconize-min.js"></script>
2. Call the function on the links and the plugin will do the rest.
$("a").faviconize();
3. Place the favicons at the end of the links.
$("a").faviconize({
position: "after"
});
4. Makes the favicons linkable.
$("a").faviconize({
linkable: true
});
5. Specify the default image that will show next the link when there's no favicon found.
$("a").faviconize({
defaultImage: "external.gif"
});
6. Add an extra CSS class to the favicons.
$("a").faviconize({
className: "faviconize"
});
7. Specify an array of links to exclude.
$("a").faviconize({
exceptions: ['LINK 1', 'LINK 2']
});
This awesome jQuery plugin is developed by bradmontgomery. For more Advanced Usages, please check the demo page or visit the official website.










