jQuery Plugin To Highlight HashTags In Text Fields goslowTag - Download jQuery Plugin To Highlight #HashTags In Text Fields - goslowTag

Download jQuery Plugin To Highlight #HashTags In Text Fields – goslowTag

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin To Highlight #HashTags In Text Fields – goslowTag, hope it will help you in programming stack.

jQuery Plugin To Highlight HashTags In Text Fields goslowTag - Download jQuery Plugin To Highlight #HashTags In Text Fields - goslowTag
File Size: 4.8 KB
Views Total: 1900
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

goslowTag is a lightweight jQuery plugin to highlight hashtags inside your text fields (input fields and textareas) by wrapping the #hashtag in the span element.

How to use it:

1. Add jQuery library and the jQuery goslowTag plugin’s source files into the webpage.

1 <link rel="stylesheet" href="css/goslowTag.css">
2 <script src="//code.jquery.com/jquery.min.js"></script>
3 <script src="js/goslowTag.js"></script>

2. Just call the plugin on the text field and we’re done.

1 $('input,textarea').goslowTag();

3. All the strings with the ‘#’ prefix will be wrapped in the <span class="hashtag">#hashtag</span> element so that you can style them in the CSS whatever you like. Note that make sure the font-size matches your input field or textarea font-size.

1 .goslowTag .hashtag{
2   font-weight: 500;
3   color: black;
4   white-space: pre-wrap;
5 }

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

source : jqueryscript.net