1

尝试使用 jQueryUI 测试“已连接”可排序功能时,我在 Firebug 控制台上遇到错误。这是我在拖动表格行时收到的错误类型:

Error: Permission denied to access property 'sortableItem'
  target[ name ] = copy;

如果我关闭 Firebug,Sortable 功能似乎工作得很好。

这是我正在测试的代码:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>ja test</title>

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<script>
$(document).ready(function(){
$( ".connected" ).sortable({
        items: 'tbody > tr',
        connectWith: ".connected",

        update: function(e, ui){
              // AJAX code will go here
              alert("hello"); // testing only
                }

        });
});
</script>
</head>
<body>      

<table border="0" width="50%" class="connected" id="unranked">
    <thead>
          <tr class="body-bold">
            <td>id</td>
            <td>Start Date </td>
            <td>End Date </td>
            <td>&nbsp;</td>
          </tr>
     </thead>
     <tbody id="sortableUnranked">
        <tr id="contentid-9896">
            <td>A9896</td>
            <td>2013-02-21</td>
            <td>2013-03-31</td>                 
            <td><input class="edit-button" type="button" name="edit" value="Edit"></td>         
        </tr>
     </tbody>
</table>
4

1 回答 1

0

原来是一个低于当前版本的 Firebug 附加 FireQuery。我安装了 1.2 版(Firefox 报告说我所有的附加组件都是最新的)。当我访问 FireQuery 测试页面(测试 FireQuery 的功能): http: //firequery.binaryage.com/test/时,我发现它也显示 Firebug 错误,最新版本 1.3 的发行说明说这些更改是为了解决与 Firefox 安全模型相关的问题。当我安装 FireQuery 1.3 时,FireQuery 测试页面可以正常工作,我的脚本也是如此。

于 2013-03-11T22:55:56.483 回答