Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. <div class="field">
  2. <label class="" for="limitation">Limitions?</label>
  3. <div class="radio-content">
  4. <input id="limitation1" type="radio" class="limitSelected" name="limitation[]" value="1" />
  5. <input id="limitation" type="radio" class="limitSelected" name="limitation[]" value="0" />
  6. </div>
  7. <div class="limitation_points">
  8. <select id="pillers" name="pillers[]">
  9. <option value="0">0</option>
  10. <option value="1">1</option>
  11. </select>
  12. </div>
  13. </div>
  14. <div class="field">
  15. <label class="" for="limitation">Limitions?</label>
  16. <div class="radio-content">
  17. <input id="limitation1" type="radio" class="limitSelected" name="limitation[]" value="1" />
  18. <input id="limitation" type="radio" class="limitSelected" name="limitation[]" value="0" />
  19. </div>
  20. <div class="limitation_points">
  21. <select id="pillers" name="pillers[]">
  22. <option value="0">0</option>
  23. <option value="1">1</option>
  24. </select>
  25. </div>
  26. </div>
  27.  
  28. jQuery(document).ready(function($) {
  29. $('.limitation_points').hide();
  30. $('.field .limitSelected').each(function(){
  31. $(this).change(function() {
  32. var selected = $(this).val();
  33. if(selected == '1') {
  34. alert('yes');
  35. $(this).closest('.field').find('.limitation_points').fadeIn(200);
  36. } else {
  37. $(this).closest('.field').find('.limitation_points').fadeOut(200);
  38. alert('no');
  39. }
  40. });
  41. });
  42. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement