如何使 Flash 对象可拖动。下面是一个 youtube 嵌入代码。我正在尝试使播放器可拖动。在标记对象上执行 .draggable 似乎不起作用。有任何想法吗。

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/base/jquery-ui.css" type="text/css" media="all" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js" type="text/javascript"></script>



<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/qgnfcCZ_yew?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qgnfcCZ_yew?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>

<script type="text/javascript">
$("object").draggable();
</script>

最佳答案

您需要将嵌入代码包装在 div 中
查看工作代码:http://jsfiddle.net/CTKhK/1

<div id="youVid">
  ... // place embed code here
</div>

$(function(){
$("#youVid").draggable();
});

编辑:
看看这是否能让你信服:
http://jsfiddle.net/CTKhK/2/

关于带有 Flash 对象的 Jquery UI 可拖动,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4632253/

10-12 15:44