Tiny jQuery Plugin To Parse URLs Within Text Linkalize - Download Tiny jQuery Plugin To Parse URLs Within Text - Linkalize

Download Tiny jQuery Plugin To Parse URLs Within Text – Linkalize

Posted on

This time I will share jQuery Plugin and tutorial about Tiny jQuery Plugin To Parse URLs Within Text – Linkalize, hope it will help you in programming stack.

Tiny jQuery Plugin To Parse URLs Within Text Linkalize - Download Tiny jQuery Plugin To Parse URLs Within Text - Linkalize
File Size: 8.63 KB
Views Total: 328
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   



Linkalize is a super tiny jQuery plugin which parses all URLs within your text and converts them into appropriate links for better user experiences.

How to use it:

1. Include the jQuery Linkalize plugin after jQuery library before the closing body tag.

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

2. Call the plugin and we’re done. In this case, all the plain text references of URLs inside the container ‘demo’ will be converted into clickable links.

1 $('#demo').linkalize();

3. You can add additional CSS classes to links using ‘class’ attribute on init.

1 $('#demo').linkalize({
2   class: 'links'
3 });

4. By default, the links will be opened in the same window. You can change the ‘open’ options to open the links in a new window.

1 $('#demo').linkalize({
2   open: 'blank',
3 });

5. The plugin also allows adding additional Html5 data attributes to links using ‘data’ object.

1 $('#demo').linkalize({
2  
3   // <a data-attr="value">...</a>
4   data: {attr: 'value'}
5  
6 });

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




source : jqueryscript.net