0

why is this not working

$('button').click(function(){ $('input[type="text"]').val(''); }); the code up has to add an event lister in all of the buttons in the page when a button has clicked the value of the input is set to "", but when I click the button the input does not delete from the first time, instead I have to click on it twice. please, I need a solution.

24th Nov 2018, 12:30 PM
Youssef Hammad
Youssef Hammad - avatar
1 Antwort
0
Do you have a link to the code?
24th Nov 2018, 9:44 PM
jack
jack - avatar