Dpack get data Node : V10
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

34 rivejä
1.3 KiB

  1. $(".cc-num").keyup(function() {
  2. if (this.value.length == this.maxLength) {
  3. var $next = $(this).next('.cc-num');
  4. if ($next.length)
  5. $(this).next('.cc-num').focus();
  6. else
  7. $(this).blur();
  8. }
  9. });
  10. $('.cc-num').on("focusin", function() {
  11. $('.cc-num').attr('type', 'password')
  12. $(this).attr('type', 'text');
  13. $('.card-number').addClass('focused');
  14. });
  15. $('.cc-num').on("focusout", function() {
  16. $('.card-number').removeClass('focused');
  17. });
  18. $('.dropdown').click(function() {
  19. $(this).next('ul').stop().slideToggle();
  20. $(this).toggleClass('selected');
  21. });
  22. $('.card-number').on('keydown', '.cc-num', function(e) {
  23. -1 !== $.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) || /65|67|86|88/.test(e.keyCode) && (!0 === e.ctrlKey || !0 === e.metaKey) || 35 <= e.keyCode && 40 >= e.keyCode || (e.shiftKey || 48 > e.keyCode || 57 < e.keyCode) && (96 > e.keyCode || 105 < e.keyCode) && e.preventDefault()
  24. });
  25. $('.submit').hover(function(){
  26. $('.arrow').addClass('rotate');
  27. }, function(){
  28. $('.arrow').removeClass('rotate');
  29. });
  30. $('.part.bg').mousemove(function(e){
  31. var amountMovedX = (e.pageX * -1 / 30);
  32. var amountMovedY = (e.pageY * -1 / 9);
  33. $(this).css('background-position', amountMovedX + 'px ' + amountMovedY + 'px');
  34. });