SHARE
TWEET

Untitled

a guest May 19th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.     (function () {
  3.     'use strict';
  4.  
  5.     $('#monthly-2').change(function () {
  6.         hideShowFormElements();
  7.     });
  8.  
  9.     $(document).ready(function () {
  10.         hideShowFormElements();
  11.     });
  12. })();
  13.  
  14. function hideShowFormElements() {
  15.     var monthly = $('#monthly-2').is(':checked');
  16.  
  17.     if(monthly) {
  18.         $('#monthly').show();
  19.         $('#yearly').hide();
  20.         $('#monthly-2').prop('checked', false);
  21.     }else{
  22.         $('#yearly').show();
  23.         $('#monthly').hide();
  24.         $('#monthly-2').prop('checked', true);
  25.         $('#yearly-2').prop('checked', false);
  26.     }
  27. }
  28. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top