tweetParser.js Parse elements containing a tweets and turn URLS, @users & #hashtags into working urls
Parameters | Type | default | description |
---|---|---|---|
urlClass | String | tweet_link | css Class used for url in the tweet |
userClass | String | tweet_user | css Class used for @user profil url in the tweet |
hashtagClass | String | hashtag | css Class used for hashtags url in the tweet |
target | HTML attribute for anchor tags | _blank | target used for all generated |
if you want to use bower just type :
bower install jquery.tweet-parser
<script src="js/jquery.min.js"></script>
<script src="js/jquery.tweetParser.min.js"></script>
<p class="tweets">This is my awesome text only tweet ! #web #twitter @twitter http://www.twitter.com/ !!</p>
//basic usage
$("p.tweets").tweetParser();
//With parameters
$("p.tweets").tweetParser({
urlClass : "tweet_link", //this is default
userClass : "tweet_user", //this is default
hashtagClass : "hashtag", //this is default
target : "_blank" //this is default
});
you can customize your tweet with css classes used in parameters