%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home2/vacivi36/sistemaparcerias/padrao/js/
Upload File :
Create Path :
Current File : //home2/vacivi36/sistemaparcerias/padrao/js/main.js

(function($) {

  $('#tipoexame').parent().append('<ul class="list-item" id="newtipoexame" name="tipoexame"></ul>');
  $('#tipoexame option').each(function(){
      $('#newtipoexame').append('<li value="' + $(this).val() + '">'+$(this).text()+'</li>');
  });
  $('#tipoexame').remove();
  $('#newtipoexame').attr('id', 'tipoexame');
  $('#tipoexame li').first().addClass('init');
  $("#tipoexame").on("click", ".init", function() {
      $(this).closest("#tipoexame").children('li:not(.init)').toggle();
  });
  
  var allOptions = $("#tipoexame").children('li:not(.init)');
  $("#tipoexame").on("click", "li:not(.init)", function() {
      allOptions.removeClass('selected');
      $(this).addClass('selected');
      $("#tipoexame").children('.init').html($(this).html());
      allOptions.toggle();
  });

  var marginSlider = document.getElementById('slider-margin');
  if (marginSlider != undefined) {
      noUiSlider.create(marginSlider, {
            start: [500],
            step: 10,
            connect: [true, false],
            tooltips: [true],
            range: {
                'min': 0,
                'max': 1000
            },
            format: wNumb({
                decimals: 0,
                thousand: ',',
                prefix: '$ ',
            })
    });
  }
  $('#reset').on('click', function(){
      $('#register-form').reset();
  });
  $('#sair').on('click', function(){
    document.location.href = "../sair.php";
});

  $('#register-form').validate({
    rules : {
        nome : {
            required: true,
        },
        cidade : {
            required: true,
        },
        celular : {
            required: true
        },
        email : {
            required: true,
            email : true
        },
        tipo : {
            required: true,
        }
    },
    onfocusout: function(element) {
        $(element).valid();
    },
});

    jQuery.extend(jQuery.validator.messages, {
        required: "",
        remote: "",
        email: "",
        url: "",
        date: "",
        dateISO: "",
        number: "",
        digits: "",
        creditcard: "",
        equalTo: ""
    });
})(jQuery);

Zerion Mini Shell 1.0