I have something like this:
$(".BWTabVerticalTitle").on("click", function () { alert('You pressed enter!'); });
and something like this:
$(".BWTabVerticalTitle").keypress(function (e) {
if (e.which == 13) {
alert('You pressed enter!');
}
});
Now, I would like to combine these 2, to one statement which calls that function. May be something like this:
$(".BWTabVerticalTitle").on("click", function (e) {
if (e.which == 13) {
alert('You pressed enter!');
}
}).keypress();
The goal is to activate the function whith the ENTER-key and a click event, but my idea does not work...
Thanks...