I recently wrote the following selector with a little help from (possbily you) StackOverflow
$(':submit[name="Delete"][value="Delete"]').click(function() {
return window.confirm(this.title || 'Delete this record?');
});
Q: Now that 1.4 has been released, is there a more elegant way to write the selector?
No, there are no new selectors, but if you find yourself doing something similar a lot you can create your own selector. Here is one with somewhat limited use:
You could then change your line to read:
Here is a more functional one, that matches the string arbitrarily:
It would be called like this:
But would also work if you used the same naming structure for other buttons: