Streaming live at 10am (PST)

Wrap an input into a label

Hi everyone,

I need to wrap inputs of a form into parent labels. So I’m using jquery for that, here’s the function I use:

$(document).ready(function() {
$("#option-1").wrap("<label for='option-1'>Label: </label>");
});

option-1 being the input I want to wrap. But this doesn’t seem to work. Is it actually possible to do so in another way? What do I get wrong?

Thank you all in advance for your help.