I would like to write a jquery function that accepts either a dom element or its id as input:
function myfunction(myinput){
// pseudocode:
// if (myinput is dom element){
// var myID = $(myinput).attr('id');
// } else {
// var myID = myinput;
// }
// Do stuff with myID ...
}
Question: How can I tell whether myinput is a dom element???