I need a simple jQuery code that will add an empty label tag next to every radio button or checkbox
So for example:
$('input[type="radio"]').next().add("<label for="radio"></label>");
$('input[type="checkbox"]').next().add("<label for="checkbox"></label>");
How can I accomplish this?
Thanks.
$('input[type="radio"]').after("<label for='radio'></label>");
$('input[type="checkbox"]').after("<label for='checkbox'></label>");