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 i
I wonder if a nice ternary would work, something like this
var myID = $(myInput).attr('id') ? $(myInput).attr('id') : myInput;