Have a table column I\'m trying to expand and hide:
jQuery seems to hide the td elements when I select it by class but not by element\'s name.
td
You can get the name value from an input field using name element in jQuery by:
var firstname = jQuery("#form1 input[name=firstname]").val(); //Returns ABCD var lastname = jQuery("#form1 input[name=lastname]").val(); //Returns XYZ console.log(firstname); console.log(lastname);