This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
input_email.on('keypress', function(e) { | |
if (e.which == 13) { | |
console.log("keypress email"); | |
setTimeout(function(){ | |
$('#input_email').blur(); | |
$('#btn_cotizar').click(); | |
}, 500); | |
return false; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IE 7 A MAS | |
<!--[if gt IE 7]> | |
<section> | |
<h1>Te encuentras en INTERNET EXPLORER NO SOPORTADO</h1> | |
</section> | |
<![endif]--> | |
no muestra en ningun internet explorer | |
<!--[if !IE]><!--> | |
.... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var from_$input = $('#fecha_partida').pickadate(), | |
from_picker = from_$input.pickadate('picker') | |
| |
var to_$input = $('#fecha_retorno').pickadate(), | |
to_picker = to_$input.pickadate('picker') | |
| |
| |
// Check if there’s a “from” or “to” date to start with. | |
if ( from_picker.get('value') ) { | |
to_picker.set('min', from_picker.get('select')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = $('#fecha_retorno').pickadate('picker').get('highlight', 'yyyy/mm/dd') | |
--> "2017/12/15" | |
x = parseInt($('#fecha_retorno').pickadate('picker').get('highlight', 'yyyymmdd')) | |
-->20171215 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onlyMayusLetter (letters ) { | |
letters.bind('keyup', function (e) { | |
if (e.which >= 97 && e.which <= 122) { | |
var newKey = e.which - 32; | |
// I have tried setting those | |
e.keyCode = newKey; | |
e.charCode = newKey; | |
} | |
letters.val((letters.val()).toUpperCase()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.fn.PhoneOnly = function() { | |
return this.each(function() { | |
$(this).keydown(function(e) { | |
const key = e.charCode || e.keyCode || 0; | |
return ( | |
key == 109 || key == 32 || key == 46 || | |
key == 16 || key == 189 || | |
key == 8 || key == 9 || | |
key == 13 || key == 110 || | |
(key >= 35 && key <= 40) || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dateStartFinishMaterial() { | |
$('.datepicker').pickadate({ | |
firstDay: true, | |
selectMonths: true, // Creates a dropdown to control month | |
labelMonthNext: 'Mes siguiente', | |
labelMonthPrev: 'Mes anterior', | |
labelMonthSelect: 'Selecciona un mes', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var d = new Date(); | |
var month = d.getMonth()+1; | |
var day = d.getDate(); | |
var output = d.getFullYear() + '/' + | |
(month<10 ? '0' : '') + month + '/' + | |
(day<10 ? '0' : '') + day; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//GET | |
$.ajax({ | |
url: "URL", | |
method: "get", | |
// dataType AND CONTENTTYPE is neccessary when need in the header | |
dataType : "json", | |
contentType: "application/json; charset=utf-8", | |
data:{}, | |
success: function (data){ state.dest = data.destinos; | |
render(root); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<main id="app"></main> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react.js"></script> |
NewerOlder