jQuery Plugin For Turning Plain URLs Into Links - linkItUp
File Size: | 6.71 KB |
---|---|
Views Total: | 672 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |

linkItUp is an ultra light (~1kb) jQuery plugin that finds raw URLs in a specified container and converts them into clickable a
links. In addition, you can add custom CSS classes or styles to the a
tag.
See also:
- jQuery Plugin To Transform URLs In Text Into Links - linkify
- Tiny jQuery Plugin To Parse URLs Within Text - Linkalize
- jQuery Plugin To Convert URLs & Emails Into Html Links - Linkify
- Convert Plain Text URL Into Hyperlink - jQuery Feedify
How to use it:
1. Put jQuery library and the jQuery linkItUp plugin at the end of the document so the pages load faster.
<script src="//code.jquery.com/jquery-1.12.1.min.js"></script> <script src="src/linkItUp.js"></script>
2. Call the linkItUp()
function on the container that contains URLS in text format.
$('.container').linkItUp();
3. Open the links in new windows.
$('.container').linkItUp({new_tab: true});
4. Add additional CSS classes to the links.
$('.container').linkItUp({ class: 'some-class and-other-class', });
5. Apply custom CSS classes to the links.
$('.container').linkItUp({ style: 'background-color: #EF476F;' });
6. Specify the link rel
attribute.
$('.container').linkItUp({ rel: 'nofollow' });
7. Make all the links have the same 'title' attribute.
$('.container').linkItUp({ title: 'link title' });
This awesome jQuery plugin is developed by toddnestor. For more Advanced Usages, please check the demo page or visit the official website.