tags:

views:

64

answers:

2

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

+1  A: 
$('body').append('<div id="d1">some div</div><div id="d2">some other div</div>')
Darin Dimitrov
but how can i show it with fadein effect by using append it is showing the div with blink but i want to show the dive with fadeIn("slow")
Web Worm
`$('<div>some div</div>').fadeIn('slow').appendTo('body')`
Darin Dimitrov
+1  A: 

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>
Dinu Florin
but i want to display these divs one after other inline it is changing the new div to current div
Web Worm