I have a number of inputs in some forms and I would like to add unique classes to each input based on the input name.
So for example this:
<input name="first_name">
... would become this using JQuery:
<input name="first_name" class="first-name">
I've searched around but could not find much reference to extracting the input name.