0
这是可笑的,它适用于所有浏览器,但Firefox。我试过IE6.0,Opera,Safari,一切正常。但Firefox提示如下错误:jQuery UI可拖动不能在Firefox中使用“error draggable()不是一个函数”
$("#draggable").draggable
is not a function.
这里是我的代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery UI Draggable - Default functionality</title>
<link rel="stylesheet" href="/js/ui/1.8.5/themes/base/jquery.ui.all.css"/>
<script type="text/javascript" src="/js/ui/1.8/js/jquery-1.4.2.min.js"></script>
<script type="text/jscript" src="/js/ui/1.8/ui/jquery.ui.core.js"></script>
<script type="text/jscript" src="/js/ui/1.8/ui/jquery.ui.widget.js"></script>
<script type="text/jscript" src="/js/ui/1.8/ui/jquery.ui.mouse.js"></script>
<script type="text/jscript" src="/js/ui/1.8/ui/jquery.ui.draggable.js"></script>
<style type="text/css">
#draggable { width: 150px; height: 150px; padding: 0.5em;}
</style>
<script type="text/javascript">
$(function() {
$("#draggable").draggable();
});
</script>
</head>
<body>
<div class="demo">
<div id="draggable" class="ui-widget-content">
<p>Drag me around</p>
</div>
</div>
</body>
</html>
感谢数千次。它现在有效。这是一个错字,但长期困扰着我。再次感谢。 – chunlu 2010-09-26 03:23:41