Forgive me if this has been discussed/resolved before. I have done a search of both this mailing list and the web, but I can't find a solution to my problem (which is odd as I would think plenty of people would have the same requirement and therefore the same problem).
Basically, I have a OL of "Questions". Each question has an OL of "Answers". The user needs to be able to order the questions and also the answers within each question. Here is some HTML and script that demonstrates the issue:
<ol id="questionList1" class="questionsList">
<li class="question" id="question1">
<span class="questionTitle">Question 1</span>
<ol id="answerList1" class="answersList">
<li class="answer">Answer 1</li>
<li class="answer">Answer 2</li>
</ol>
</li>
<li class="question" id="question2">
<span class="questionTitle">Question 2</span>
<ol id="answerList2" class="answersList">
<li class="answer">Answer 1</li>
<li class="answer">Answer 2</li>
</ol>
</li>
</ol>
<script type="text/_javascript_">
Sortable.create("questionList1", {only: "question", handle: "questionTitle"});
Sortable.create("answerList1", {only: "answer"});
Sortable.create("answerList2", {only: "answer"});
</script>
By creating a sortable on the sub OL (answersLists), it stops the main questionsList from being sortable (i.e can't sort questions). If we comment out the Sortable.create for the two answer lists, the main questions sortable works fine.
Am I doing something wrong (obviously)? Is it possible to acheive what I need with Sortables?
Thanks in advance,
Justin
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs