Now making playlist using switchery checkbox, and already make it like a radio button,
but it cant toggle back.
How can i make Switchery back to idle state / unchecked state ??
$(document).ready(function() {
//switchery
var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
elems.forEach(function(html) {
var switchery = new Switchery(html,{size: 'small',});
});
//detect change
$('input.pinmusic').on('change', function() { //detect change
$('.pinmusic').not(this).prop('checked', false); //auto uncheck
});
});
PS : its already checked, but only switchery get stuck. already browse some topic of switchery here but still error.
Aucun commentaire:
Enregistrer un commentaire