0

以下は私のJqueryコードです:

jQuery(document).ready(
            function() {
                jQuery("#document-list-1").sortable({
                    update : function () {
                        serial = jQuery('#document-list-1').sortable('serialize');
                        jQuery.ajax({
                        url: "/?module=website_documents&action=reorder_website_document_by_dragdrop&website_id=18374",
                        type: "post",
                        data: serial,
                        error: function(){
                            alert("there is an error with AJAX");
                        }
                    });
                }
            });
        });
        jQuery(document).ready(
                function() {
                    jQuery("#documentChildList").sortable({
                        update : function () {
                            serial = jQuery('#documentChildList').sortable('serialize');
                            jQuery.ajax({
                            url: "/?module=website_documents&action=reorder_website_document_by_dragdrop&website_id=18374",
                            type: "post",
                            data: serial,
                            error: function(){
                                alert("there is an error with AJAX");
                            }
                        });
                    }
                });
            });

HTML コード:

<ul id="document-list-1">
  <li><img src="images/move.jpg">Test1
   <ul id="documentChildList">
      <li><img src="images/move.jpg">test2</li>
      <li><img src="images/move.jpg">test3</li>
    </ul>
  </li>
</ul>

親カテゴリの並べ替えは正常に機能しています。しかし、子カテゴリの場合、IE8でクリックすると、その画像、つまりmove.jpgが右側に移動し、リスト全体と親カテゴリが上下に移動します。

「document-list-1」の jQuery コードを削除すると、子カテゴリの並べ替えも正常に機能しますが、親カテゴリの並べ替えは機能しません。

何がうまくいかないのかわからない。

4

0 に答える 0