开发者

creating multiple divs with javascript [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Close开发者_如何转开发d 10 years ago.

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>')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜