Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
- <style>
- .otherCon {visibility: hidden;}
- label {display: block;}
- </style>
- </head>
- <body>
- <div>
- <div class="userCheck">
- <input type="checkbox" id="other" name="Other" value="Other" />
- <label>Other</label>
- </div>
- <div class="otherCon">
- <label>If other</label>
- <textarea id="text" name="Other Response"></textarea>
- </div>
- <div>
- <label>More info</label>
- <textarea id="text" name="More info"></textarea>
- </div>
- <script>
- $('#other').on('click', function() {
- if ($(this).is(':checked')) {
- $('.otherCon').css('visibility', 'visible');
- } else {
- $('.otherCon').css('visibility', 'hidden');
- }
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement