I have 2 input field and also 2 submit button that are hidden and i am using jquery to submit input field when enter is pressed,so i want to find that when enter is pressed it display selected button id i have done it in jquery bt it dont show me any id here is example on jsfiddle
$('input').click(function() {
var id=$(this).attr('id');
alert(id);
});
this shows me all the id but i one only selected http://jsfiddle.net/azamalvi/kD3bx/7/
$('input').click(function(eventObject) {
var idOfButtonClicked = $(eventObject.target).attr('id');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With