Is there any way to get the text of the selector that invoked some function (if it exists) from within the function?
For example
$('#foo, .bar').click(function() {
// Here I want to figure out if there was a match on #foo, or .bar
});
Basically I want to have a compounded selector like the one above (http://api.jquery.com/multiple-selector/) but be able to know which one was matched when I get inside the function.