Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. var agreed = false;
  2.  
  3. $("#button").click( function()
  4. {
  5. if( !agreed )
  6. {
  7. alert( "You must agree before proceeding." );
  8. return false;
  9. }
  10.  
  11. _gaq.push(['_trackEvent', 'Form Submit', 'Button clicked']);
  12. $('#button').hide();
  13. window.setTimeout(proceed, 700);
  14. return false;
  15. });
  16.  
  17. function proceed() {
  18. $( '#proceed' ).submit();
  19. }
  20.  
  21. $("#toggler").click(function() {
  22. agreed = !agreed;
  23. });
  24.  
  25. function showButton() {
  26. $('#button').toggle();
  27. return false;
  28. }
  29.  
  30. jQuery('input#inputName').validateText(function(result) {
  31. if (result.type.name == 'confirmed'){
  32. $(".terms").fadeOut('slow', function() {
  33. agreed = true;
  34. $('#toggler')[0].checked = true;
  35. });
  36. $( "input#inputName" ).css('background-position', '15px 13px, calc(100% - 11px) -29px');
  37. }
  38. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement