I have got a input field where in user enters data. There are 2 buttons next to it upon click any one of them or both the input fields get reset. Now since these buttons and field is not inside a form I can't go for a instead how can i clear it with JQuery. The point is, now I have displayed only 2 buttons, the JQuery must also work if there where more buttons..Fiddle link below and the code i tried
$('button').each(function(){
$('button').click(function(){
find('input[type="text"]').val() = "0";
});
});
[Fiddle link] http://jsfiddle.net/vineetgnair/1s22gcL5/
Thanks to all for help.