javascript
1<script> 2$(document).ready(function(){ 3 $('input').iCheck({ 4 checkboxClass: 'icheckbox_minimal-red', 5 radioClass: 'iradio_minimal', 6 increaseArea: '10%', 7 cursor: true, 8 }); 9}); 10$('input').on('ifChecked', function(event){ 11 var checked = (this.value); 12 //checkedにはhoge001が入っています。 13}); 14</script>
HTML
1<div class="checkbox"> 2 <label for="hoge001"> 3 <div class="icheckbox_minimal-red" aria-checked="false" aria-disabled="false"> 4 <input type="checkbox" name="hoges[]" value="hoge001" id="hoge001"></ins> 5 </div> 6 </label> 7</div>
#####説明
var checked = (this.value);
でチェックした値は取得できているようです。
チェックされたことを<input>
に渡してあげる方法を教えていただきたいたいです。
######補足
・利用しているプラグイン
http://icheck.fronteed.com/
回答2件
あなたの回答
tips
プレビュー