Posted By

matthalliday on 02/16/10


Tagged

form input


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

nightshiftc


Gives all inputs a class name of their type


 / Published in: jQuery
 

  1. $('input').each(function() {
  2. var inputType = $(this).attr('type');
  3. $(this).addClass(inputType);
  4. });

Report this snippet  

You need to login to post a comment.