Nekto
Nekto

Reputation: 336

Bootstrap switch buttons don't work on mobile devices

I'm using an amazing Bootstrap switch buttons and can't figure out why checkboxes doesn't work properly on mobile devices (tested on Android 4.0 phone and iPhone 3G). Actually they are working, but a trigger action which displays a datepicker doesn't work at all :(

Here's a link: http://decart-design.com/365direkte/html5/

Here's a JS code for this switch button:

$('#mobile-order-form #statsborger1 input[type="checkbox"]').bind('change', function(){
        if ($(this).is(":checked")) {
            $('#statsborger2').slideUp(200);

        } else {
            $('#statsborger2').slideDown(200).find('input').focus();
            var datepicker = $('#statsborger2 input[type="text"]').data('Zebra_DatePicker');
            datepicker.show();
        }
    });

As you can see by browsing the link above on desktop the datepicker area appears when you click the first switch button. But this switch doesn't work on mobile browsers.

Could you please to figure out why it happens and what I'm doing wrong? Thank you in advance!

Upvotes: 0

Views: 1021

Answers (1)

Nekto
Nekto

Reputation: 336

The solution is found, a silly unclosed square brace :) Thanks everyone!

Upvotes: 1

Related Questions