-
Notifications
You must be signed in to change notification settings - Fork 470
Open
Description
I have an iOS7 style switches for my checkboxes . but i need to show the handler with a box shadow.
how to add box shadow when it check,my code is like below
` var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
elems.forEach(function (html) {
var switchery = new Switchery(html, {color: '#fff', jackColor: '#00aeef',jackSecondaryColor:''});
html.onchange = function () {
var medicineId = html.name;
var checked = html.checked;
var form = $('form').get(0);
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url: "{{\App\Helpers\serverName()}}/change-medicine-alarm?medicineId=" + medicineId + "&alarm=" + checked,
type: "post",
data: new FormData(form),
dataType: "json",
contentType: false,
cache: false,
processData: false
}).done(function (res) {
var information = res;
console.log(information);
if (information=='ok'){
// var el = document.getElementsByClassName('js-switch');
//
// alert(el.closest("small"));
//
var s= $( "input#recipe" ).closest( ".switchery-default" ).find();
// .css( "left", "300px !important" );
console.log(s);
}
});`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels