Sha256: 21470d5d3d33d2a9389d42ed3c1258162fbfc13fed1ed273eea26d992d88934e

Contents?: true

Size: 661 Bytes

Versions: 1

Compression:

Stored size: 661 Bytes

Contents

var initSwitchery = function() {
  var elem = $('.js-switch')
  if (elem[0]){
    var init = new Switchery(elem[0], {
      color: elem.data('color'),
      secondaryColor: elem.data('secondaryColor'),
      jackColor: elem.data('jackColor'),
      jackSecondaryColor: elem.data('jackSecondaryColor'),
      size: elem.data('size')
    });
  }
}

var initMasks = function() {
  var input = $('.masked input');
  var pattern = input.data('pattern');
  input.mask(pattern);
}

var ready = function() {
  initSwitchery();
  initMasks();
};

if (typeof Turbolinks == "undefined") {
  $(document).ready(ready);
} else {
  $(document).on("turbolinks:load", ready);
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simple_form_custom_inputs-0.0.2 vendor/assets/javascripts/simple_form_custom_inputs.js