Whenever I click the button to add an address, I want to dynamically create a new div structure using jQuery
<div id="container">
<div class="address">
<div class="input-reg rb-item input-group">
<span class="input-group-addon">Address </span>
<input type="text" class="form-control" placeholder="Insert text here">
</div>
<div align="center"><iframe class="map-img" width="100%" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?hl=en&ie=UTF8&ll=37.0625,-95.677068&spn=56.506174,79.013672&t=m&z=4&output=embed"></iframe></div>
</div>
</div>
<div align="center" style="margin-top: 10px"><button id="btnAddAddress" class="btn btn-warning btn-md" type="button">Add Address</button></div>
I have attempted to achieve this functionality but it is not working as intended.
<script type="text/javascript">
$("#btnAddAddress").click(function () {
$("#container").append('<div class="address"><div class="input-reg rb-item input-group"><span class="input-group-addon">Address </span><input type="text" class="form-control" placeholder="Insert text here"></div><div align="center"><iframe class="map-img" width="100%" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?hl=en&ie=UTF8&ll=37.0625,-95.677068&spn=56.506174,79.013672&t=m&z=4&output=embed"></iframe></div></div>');
});
</script>