In forms you use input elements to send your form. But you can also use "button" elements to achieve the same goal. Quite recently someone committed changes into a framework I use often and changed the "input" elements to "button" elements. Normally this is no problem, but in this case it broke some Javascript I had going on.
I used to use the following:
$('myForm').getInputs('submit').each(function (button) {
// ..
});
But with this function you don't get any "button" elements, to solve this situation I changed it to:
$('myForm').select('button', 'input[type=submit]').each(function (button) {
// ..
});
It works fine however simply filtering on 'button' might be too greedy and some tweaking might be required. I use this to to track down which button was pressed by the user and act accordingly (e.g. "Save and close" versus "save").