As many of you have noticed, jQuery doesn’t allow you to select HTML 5 input elements with the standard colon selection type, like this :date
So what you can do is use brackets to define the input type you want to select. Here is what I came up with. This should include most if not all HTML5 input types.
$(':text, [type=date], [type=time], [type=search] ,[type=number] ,[type=email] ,[type=datetime] ,[type=datetime-local] ,[type=month] ,[type=week] ,[type=time] ,[type=tel] ,[type=url] ,[type=color] ,[type=range]').each(function()
{
// add what you want to do here
});
0 Comments