2011-08-26 58 views
0

我的問題是:我沒有在IE9上使用jQuery UI的拖放功能。我應該怎麼做?jQuery UI在IE9上的拖放問題

這裏是我的代碼:

<script type="text/javascript" src="js/jquery-1.3.2-vsdoc.js" ></script> 
<script type="text/javascript" src="js/jquery.json-2.2.min.js" ></script> 
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js" ></script> 
<script type="text/javascript" > 
$(function() { 
    $(".dragbox") 
.each(function() { 
$(this).hover(function() { 
    $(this).find("h2").addClass("collapse"); 
}, function() { 
    $(this).find("h2").removeClass("collapse"); 
}) 
.find("h2").hover(function() { 
    $(this).find(".configure").css("visibility", "visible"); 
}, function() { 
    $(this).find(".configure").css("visibility", "hidden"); 
}) 
.click(function() { 
    $(this).siblings(".dragbox-content").toggle(); 
    updateWidgetData(); 
}) 
.end() 
.find(".configure").css("visibility", "hidden"); 
}); 
    $(".column").sortable({ 
     connectWith: ".column", 
     handle: "h2", 
     cursor: "move", 
     placeholder: "placeholder", 
     forcePlaceholderSize: true, 
     opacity: 0.4, 
     start: function(event, ui) { 
      //Firefox, Safari/Chrome fire click event after drag is complete, fix for that 
      if ($.browser.mozilla || $.browser.safari) 
       $(ui.item).find(".dragbox-content").toggle(); 
     }, 
     stop: function(event, ui) { 
      ui.item.css({ "top": "0", "left": "0" }); //Opera fix 
      if (!$.browser.mozilla && !$.browser.safari) 
       updateWidgetData(); 
     } 
    }) 
    .disableSelection(); 
    }); 
    function updateWidgetData() { 
    var items = []; 
    $(".column").each(function() { 
     var columnId = $(this).attr("id"); 
     $(".dragbox", this).each(function(i) { 
      var collapsed = 0; 
      if ($(this).find(".dragbox-content").css("display") == "none") 
       collapsed = 1; 
      var item = { 
       id: $(this).attr("id"), 
       collapsed: collapsed, 
       order: i, 
       column: columnId 
      }; 
      items.push(item); 
     }); 
    }); 
    var sortorder = { items: items }; 
    $.ajax({ 
     type: "POST", 
     url: "not.aspx/siralamakaydet", 
     data: "{list:'" + $.toJSON(sortorder) + "'}", 
     contentType: "application/json; charset=utf-8", 
     dataType: "json", 
     error: function() { 
      alert("hata"); 
     }, 
     success: function(msg) { 

      alert(" Sıralama yapıldı..."); 
     } 
    }); 
    //Pass sortorder variable to server using ajax to save state 

    // $.post('updatePanels.php', 'data=' + $.toJSON(sortorder), function(response) { 
    //  if (response == "success") 
    //   $("#console").html('<div class="success">Saved</div>').hide().fadeIn(1000); 
    //  setTimeout(function() { 
    //   $('#console').fadeOut(1000); 
    //  }, 2000); 
    // }); 
    } 
    </script> 
+3

請添加更多的信息,就像你所期望的發生和什麼是真正發生的事情。 –

+0

@El Yobo-首先,感謝您的關注。我的項目鏈接:http://www.tr38.net/not.aspx – Selo

+0

謝謝Selo,我可以看到你的頁面,但我可以拖放罰款。 IE9下發生了什麼?我正在使用Chrome。 –

回答