【jQuery】【Javascript】radioボタンのイベントが取得できなかった時のメモ
取得できないわけない...と思い苦戦していた。
そしてよーく見ると
<div class="iradio_minimal" aria-checked="false" aria-disabled="false" style="position: relative; "> <input type="radio" name="color" value="#ed8d8d" checked="" style="position: absolute; opacity: 0;"> <ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins> </div>
ん?「class="iradio_minimal"」?
なんだこれはと思いググると
javascript - How to handle radio event when iCheck-helper is used? - Stack Overflow
が出て来ました。
ありがとうございます。
全然気づかなかったけど
Checkboxes and radio buttons customization (jQuery and Zepto) plugin
このプラグインが使用されていた。
なので「change」ではなく 「ifChange」で取得できました!
$('#idとかクラスとか').on('ifChanged', function(event){ alert("show"); });
こんな感じ〜