Guest User

Untitled

a guest
Jan 21st, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. <link href="css/cincopinpad.css" rel="stylesheet">
  2. <script src="js/jquery.cincopinpad.js"></script>
  3.  
  4. <!-- initialize keyboard (required) -->
  5. <script>
  6. $(function(){
  7. $('#cincopinpad')
  8. .cincopinpad({
  9. pinPadLayout : 'cincoCustom',
  10. type:'changePin',
  11. isMaxLength:true,
  12. maxLength:2,
  13. my_change : function(){
  14. }
  15. })
  16. });
  17. </script>
  18.  
  19. <div id="cincopinpad"></div>
  20.  
  21. // create cinco pin input fields
  22. function createCincoPinInput(el, options){
  23. var _type = options.type;
  24. var _i = (_type === 'changePin' ? 12 : _type === 'createPin' ? 8 : 4);
  25. for(i = 1; i <= _i; i++) {
  26. el.append(
  27. $('<input/>', {
  28. text: i,
  29. id: 'pin_' + i,
  30. class : options.css.pinInput,
  31. focus: function () { highLightContents(this); },
  32. keypress: function() { keyPressed(this) }
  33. })
  34. ).append((i % 4 === 0) ? '<br/>' : '');
  35. }
  36. };
Add Comment
Please, Sign In to add comment