Touche entrer génère un clique

This commit is contained in:
Divlo 2019-10-23 12:21:21 +02:00
parent a6f2537b15
commit b5f4cfc900

View File

@ -2,7 +2,14 @@ $(function () {
/* ÉXECUTION DES FONCTONS */
$( "#submitWeatherRequest" ).click(() => {
// Touche entrer génère un clique
$("body").keydown(function(e){
if(e.which === 13){
$(".btn").click();
}
});
$("#submitWeatherRequest").click(() => {
const city = $('#cityName').val();
const cityName = city.split(' ').join('+');
if(isEmptyValue(cityName)) {