Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="field">
- <label class="" for="limitation">Limitions?</label>
- <div class="radio-content">
- <input id="limitation1" type="radio" class="limitSelected" name="limitation[]" value="1" />
- <input id="limitation" type="radio" class="limitSelected" name="limitation[]" value="0" />
- </div>
- <div class="limitation_points">
- <select id="pillers" name="pillers[]">
- <option value="0">0</option>
- <option value="1">1</option>
- </select>
- </div>
- </div>
- <div class="field">
- <label class="" for="limitation">Limitions?</label>
- <div class="radio-content">
- <input id="limitation1" type="radio" class="limitSelected" name="limitation[]" value="1" />
- <input id="limitation" type="radio" class="limitSelected" name="limitation[]" value="0" />
- </div>
- <div class="limitation_points">
- <select id="pillers" name="pillers[]">
- <option value="0">0</option>
- <option value="1">1</option>
- </select>
- </div>
- </div>
- jQuery(document).ready(function($) {
- $('.limitation_points').hide();
- $('.field .limitSelected').each(function(){
- $(this).change(function() {
- var selected = $(this).val();
- if(selected == '1') {
- alert('yes');
- $(this).closest('.field').find('.limitation_points').fadeIn(200);
- } else {
- $(this).closest('.field').find('.limitation_points').fadeOut(200);
- alert('no');
- }
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement