231
| <![CDATA[<script>
// display a modal (small modal)
$(document).on('click', '#smallButton', function(event) {
event.preventDefault();
let href = $(this).attr('data-attr');
$.ajax({
url: href,
beforeSend: function() {
$('#loader').show();
},
// return the result
success: function(result) {
$('#smallModal').modal("show");
$('#smallBody').html(result).show();
},
complete: function() {
$('#loader').hide();
},
error: function(jqXHR, testStatus, error) {
console.log(error);
alert("Page " + href + " cannot open. Error:" + error);
$('#loader').hide();
},
timeout: 8000
})
});
</script>]]>
|
263
| <![CDATA[<script>
$(document).ready(function($){
var SPMaskBehavior = function (val) {
return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009';
},
spOptions = {
onKeyPress: function(val, e, field, options) {
field.mask(SPMaskBehavior.apply({}, arguments), options);
}
};
$('.cep').mask('00000-000');
$('.cpf').mask('000.000.000-00', {reverse: true});
$('.sp_celphones').mask(SPMaskBehavior, spOptions);
$('.money').mask("#.##0,00", {reverse: true});
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
});
</script>]]>
|