Touche entrer génère un clique
This commit is contained in:
parent
a6f2537b15
commit
b5f4cfc900
@ -2,7 +2,14 @@ $(function () {
|
|||||||
|
|
||||||
/* ÉXECUTION DES FONCTONS */
|
/* É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 city = $('#cityName').val();
|
||||||
const cityName = city.split(' ').join('+');
|
const cityName = city.split(' ').join('+');
|
||||||
if(isEmptyValue(cityName)) {
|
if(isEmptyValue(cityName)) {
|
||||||
|
Reference in New Issue
Block a user