Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add box-shadow to jackColor in Switchery Plugin #166

Open
setarbgram opened this issue Jul 28, 2018 · 0 comments
Open

Add box-shadow to jackColor in Switchery Plugin #166

setarbgram opened this issue Jul 28, 2018 · 0 comments

Comments

@setarbgram
Copy link

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);
                    }

                });` 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant