Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- (function () {
- 'use strict';
- $('#monthly-2').change(function () {
- hideShowFormElements();
- });
- $(document).ready(function () {
- hideShowFormElements();
- });
- })();
- function hideShowFormElements() {
- var monthly = $('#monthly-2').is(':checked');
- if(monthly) {
- $('#monthly').show();
- $('#yearly').hide();
- $('#monthly-2').prop('checked', false);
- }else{
- $('#yearly').show();
- $('#monthly').hide();
- $('#monthly-2').prop('checked', true);
- $('#yearly-2').prop('checked', false);
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement