jQuery Plugin For Turning Plain URLs Into Links linkItUp - Download jQuery Plugin For Turning Plain URLs Into Links - linkItUp

Download jQuery Plugin For Turning Plain URLs Into Links – linkItUp

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin For Turning Plain URLs Into Links – linkItUp, hope it will help you in programming stack.

jQuery Plugin For Turning Plain URLs Into Links linkItUp - Download jQuery Plugin For Turning Plain URLs Into Links - linkItUp
File Size: 6.71 KB
Views Total: 586
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.

How to use it:

1. Put jQuery library and the jQuery linkItUp plugin at the end of the document so the pages load faster.

1 <script src="//code.jquery.com/jquery-1.12.1.min.js"></script>
2 <script src="src/linkItUp.js"></script>

2. Call the linkItUp() function on the container that contains URLS in text format.

1 $('.container').linkItUp();

3. Open the links in new windows.

1 $('.container').linkItUp({new_tab: true});

4. Add additional CSS classes to the links.

1 $('.container').linkItUp({
2   class: 'some-class and-other-class',
3 });

5. Apply custom CSS classes to the links.

1 $('.container').linkItUp({
2   style: 'background-color: #EF476F;'
3 });

6. Specify the link rel attribute.

1 $('.container').linkItUp({
2   rel: 'nofollow'
3 });

7. Make all the links have the same ‘title’ attribute.

1 $('.container').linkItUp({
2   title: 'link title'
3 });

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

source : jqueryscript.net