jQuery Plugin To Convert #Symbols Into Twitter Hashtags - Hashtagger
File Size: | 3.09 KB |
---|---|
Views Total: | 728 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
Hashtagger is an ultra-light jQuery plugin for converting # symbols into clickable Twitter hashtags which can be used to mark Twitter keywords or topics.
How to use it:
1. Hashtagger requires jQuery library loaded properly in the html page.
<script src="//code.jquery.com/jquery-1.12.2.min.js"></script> <script src="hashtagger.js"></script>
2. Call the function to active the plugin. By default, the plugin looks up #symbols within "div, p, li, ul, a, strong" and then converts them into Twitter hashtags.
$('document').hashtagger();
3. Available options.
$('document').hashtagger({ // default elements elements: "div, p, li, ul, a, strong", // CSS class applied to the hashtags hashClass: "hashtag" });
4. Style the hashtags whatever you like.
.hashtag { ... }
Change log:
2016-11-09
- Added if statement that could cause lazy load to fail
This awesome jQuery plugin is developed by mattdryden. For more Advanced Usages, please check the demo page or visit the official website.