creating multiple divs with javascript [closed]
how can i create a div and show it with jquery and also how to create multiple divs with multiple ids and show it in series...........
i want to create multiple div popups one after antoher and want to show if user has any notifications one after other
Something like this?
<div id="container"></div>
<script type="text/javascript">
jQuery(function() {
var container = jQuery('#container');
for(i=0; i<10; i++)
{
var div = jQuery('<div id="div'+i+'">test</div>');
div.hide();
container.append(div);
div.fadeIn("slow");
}
});
</script>
$('body').append('<div id="d1">some div</div><div id="d2">some other div</div>')
精彩评论