I\'m matching ASP.Net generated elements by ID name, but I have some elements which may render as text boxes or labels depending on the page context. I need to figure out wh
Yet another solution, arguably more elegant, is to write two separate functions for each element type:
$("input#" + id).each(function() { alert(this + " is an input"); }); $("label#" + id).each(function() { alert(this + " is a label"); });