I am using the method .append to dynamically add DIVS to my page using jQuery. Now, I am trying to figure out how to append some content to that dynamically added DIV using a specific class name.
What is the best way to go about doing this?
EDIT:
Here is what I have tried:
$('#test.cms').append('<div id=\"new\" class=\"cms\"></div>');
$('.cms').append('<div id=\"controls\"></div>');
Try creating and appending the child controls to your dynamic div and then appending the div to your control tree.
Otherwise if you wanted to add your dynamic div first and the children later you could append your dynamic div just as you are and then use something like this to add dynamic content to it: