Cookie enabled Pay With A Tweet Plugin For jQuery payWithTweet - Download Cookie-enabled 'Pay With A Tweet' Plugin For jQuery - payWithTweet

Download Cookie-enabled ‘Pay With A Tweet’ Plugin For jQuery – payWithTweet

Posted on

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.

Cookie enabled Pay With A Tweet Plugin For jQuery payWithTweet - Download Cookie-enabled 'Pay With A Tweet' Plugin For jQuery - payWithTweet
File Size: 4.76 KB
Views Total: 581
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

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({
02  
03   // text to share
04   text: 'Check out this awesome page',
05  
06   // url to share
08  
09   // your twitter account
10   via: 'jqueryscript',
11  
12   // enable cookies
13   cookies: true
14    
15 }, function () {
16   $('a.downloadButton')
17  
18     // add a custom css class
19     .addClass('btn-danger')
20  
21     // add the download link to the download button
22     .attr('href','1.zip');
23  
24 });

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

source : jqueryscript.net