CSS problem in dynamically created div.

CSS problem in dynamically created div.

Hello,

I have a application, where you can create draggable,resizable DIVs on a container. And, save it to the database. It also has a edit functionality, where you can come back, search and retrieve a particular record, and then change the DIVs created earlier OR add a few more as well.

For this, I am storing all the information, like left,top, height,width in the database.

On Edit request, I need to place the DIVs already created and place them on the container. For this, I have created a javascript JSON array using PHP. This array is used to create the DIVs in a javascript function, called from $(document).ready.

Everything works fine. All previously created DIVs are placed properly on the container. But, the problem is, somehow the draggable DIV is not getting the "draggable", "resizable" classes of jquery ui.

If, a new child DIV is created, mannually, the previously placed DIVs all gets the missing classes, and becomes ready for DRAG or RESIZE!!

I am absolutely clueless, what makes it behave so strangely !

Any Help ?!

Thanks in advance.

Varsh..