@wewmega

Почему не работает onclick JS?

<label>
    <input type="radio" class="iCheck fu"  name="reason"  data-skin="square" value="1">Pickup Address
</label>
<div class="clear10"></div>
<label>
    <input type="radio" class="iCheck fu" name="reason" data-skin="square" value="2">Drop-off Address
</label>
<div class="clear10"></div>
<label>
    <input type="radio" class="iCheck fu"  name="reason" value="3">Service Address
</label>

$('.fu').on('click',function () {
    console.log('ok')
});

но после загрузки страницы html становится такой
<label class="">
    <div class="iradio_flat-blue " aria-checked="false" aria-disabled="false" style="position: relative;"><input type="radio" class="iCheck fu"  name="reason" data-skin="square" value="1" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div>Pickup Address
</label>
<div class="clear10"></div>
<label class="">
    <div class="iradio_flat-blue" aria-checked="false" aria-disabled="false" style="position: relative;"><input type="radio" class="iCheck fu" name="reason" data-skin="square" value="2" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div>Drop-off Address
</label>
<div class="clear10"></div>
<label class="">
    <div class="iradio_flat-blue" aria-checked="false" aria-disabled="false" style="position: relative;"><input type="radio" class="iCheck fu" name="reason" value="3" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"><ins class="iCheck-helper" style="position: absolute; top: -20%; left: -20%; display: block; width: 140%; height: 140%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins></div>Service Address
</label>
  • Вопрос задан
  • 283 просмотра
Пригласить эксперта
Ответы на вопрос 1
EreminD
@EreminD
Кое-что умею
Если взять 1й html и js - все работает

Значит, дело не в скрипте

Больше сказать не могу, т.к. дано только это
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы