Hi,

I am using following structure in my HTML page to sort various
elements. This structure is generated dynamically.

<ul id="a1">
        <li id="a1b1">
                <ul id="a1b1c1">
                        <li id="a1b1c1d1">
                                <ul id="a1b1c1d1e1">
                                        <li id="a1b1c1d1e1f1">

                                        </li>
                                        <li id="a1b1c1d1e1f1">
                                        </li>
                                </ul>
                        </li>
                        <li id="a1b1c1d2">
                                <ul id="a1b1c1d2e1">
                                        <li id="a1b1c1d2e1f1">
                                        </li>
                                        <li id="a1b1c1d2e1f2">
                                        </li>
                                </ul>
                        </li>
                </ul>
        </li>
        <li id="a1b2">
                <ul id="a1b2c1">
                        <li id="a1b2c1d1">
                                <ul id="a1b2c1d1e1">
                                        <li id="a1b2c1d1e1f1">
                                        </li>
                                        <li id="a1b2c1d1e1f2">
                                        </li>
                                </ul>
                        </li>
                        <li id="a1b2c1d2">
                                <ul id="a1b2c1d2e1">
                                        <li id="a1b2c1d2e1f1">
                                        </li>
                                        <li id="a1b2c1d2e1f2">
                                        </li>
                                </ul>
                        </li>
                </ul>
        </li>
</ul>



If I use following code explicitly then sortable works fine.

$("#a1").sortable({});
$("#a1b1c1").sortable({});
$("#a1b1c1d1e1").sortable({});

My problem here is since <ul> ids are generated then how can I place
code like above lines in <scipt> tag?

I tried $("#a1").sortable({items:"li"});  but it allows to drag and
drop in any parent element where I want to restrict.

Can anyone guide me on this?

Thanks,
Bhavin


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to