How can I determine if an object is of type "text" or "checkbox"?
<p>I have the following code:</p>

<pre><code>$("input[id^='Order_'], input[id^='Default_']").change(function (e) {
   var type = $(this).attr('id').split('_')[0];
   updateField('Menu', $(this), type);
});
</code></pre>

<p>In the updateField function is there a way that I can determine if the obj passed is of a type "text" or "checkbox"?</p>

<pre><code>function updateField(entity, obj, type) {
    var val = obj.val();
    var val = obj.is(":checked")
</code></pre>
