Combining selectors with different triggers
Hello,
I have the following
- $('#Login').keypress(function(event) {
if (event.keyCode==13) {
- //Call function with name "FUNCTION"
- }
- });
- $('#Login input[type=button]').click(function() {
//Call function with name "FUNCTION"
});
Is there any way to combine these 2 pieces as they call the same function?
Thank you for reading.