Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to generate div on already dynamically generated button ?
Posted

Check this once friend..

XML
$('#button').click(function() {
for(int i=0;i<=3;i++){
$('body').append('<div id="someid">content</div>');
}
});
 
Share this answer
 
generate div on already dynamically generated button
Suppose the dynamically generated button is buttonG and you defined css for it as buttonRuntime.

Now, use jQuery .wrap()[^]
Example:
JavaScript
$('.buttonRuntime').wrap('<div class="new" />');
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900