jQuery Plugin For Transferring Numbers To Another Element - Transfer Numbers

File Size: 4.42 KB
Views Total: 486
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Plugin For Transferring Numbers To Another Element - Transfer Numbers

Transfer Numbers is a jQuery plugin that has the ability to transfer numbers by flying and incrementally (or decrementally) changing values from one element to another. Good for cash out or check out interface on e-commerce or grambling websites.

How to use it:

1. Load the jQuery javascript library and jQuery transfer numbers plugin

<script src="http://code.jquery.com/jquery-latest.min.js"></script>  
<script src="js/jquery-transfer-numbers.js"></script>

2. Markup Html structure

<ul>
<li title="Each digit reaches destination in 0.5 seconds">Cash $ <span id="numb1">5</span></li>
<li title="5 digits will transfer per second!">From Ms. Smith $ <span id="numb2">22</span></li>
<li title="Bank it FAST!">From Mr. Joe $ <span id="numb3">100</span></li>
</ul>

<span id="bank">Destination</span>

3. Call the plugin with options

<script>
$(document).ready(function(){

  $('#numb1').click( function() {
    $(this).transferN({ target: '#bank', speed: 500});
  });

  $('#numb2').click( function() {
    $(this).transferN({ target: '#bank', speed: 200});
  });

  $('#numb3').click( function() {
    $(this).transferN({ target: '#bank', speed: 50});
  });

  $('#cashout').click( function() {
    $('#bank').transferN({ target: '#numb1', speed: 100});
  });


});
</script>

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