user1050619 user1050619 - 1 year ago 93
HTML Question

Adding a label with div using Jquery

Im trying to add a div element that contains a label but it does not work

Can you please let me know how to fix it? My fiddle


<div id="first-tab">


$( "#first-tab" ).append("<div><label for="name">Test</label></div>")


Answer Source

Working demo :)

Issue use ' doubles quotes were not used correctly.


   $( "#first-tab" ).append('<div><label for="name">Test</label></div>');

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download