This time I will share jQuery Plugin and tutorial about Cookie-enabled ‘Pay With A Tweet’ Plugin For jQuery – payWithTweet, hope it will help you in programming stack.
A cookie-enabled jQuery pay with a tweet plugin which allows to lock the html content until the users tweet about your webpage. Great for revealing the download links or discount coupons after the user publishes your content on his twitter account.
How to use it:
1. Create a link to open a Twitter tweet window.
1 |
< a href = "#" id = "tweetLink" >Pay With A Tweet</ a > |
2. Create a download button with no download link.
1 |
< a href = "#" class = "downloadButton" >Download</ a > |
3. Link to jQuery library and the jQuery payWithTweet plugin.
1 |
< script src = "//code.jquery.com/jquery-1.12.2.min.js" ></ script > |
2 |
< script src = "jquery.payWithTweet.js" ></ script > |
4. Call the function to the tweet link and add the download link to the download button after the user closes the tweet window.
01 |
$( '#tweetLink' ).tweetAction({ |
04 |
text: 'Check out this awesome page' , |
19 |
.addClass( 'btn-danger' ) |
22 |
.attr( 'href' , '1.zip' ); |
This awesome jQuery plugin is developed by maxt3r. For more Advanced Usages, please check the demo page or visit the official website.