Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery UI Draggable with Flash objects

How do i make a flash object draggable. Below is a youtube embed code. I'm trying to make the player draggable. Doing a .draggable on the tag object doesn't seem to work. Any ideas.

<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>
like image 427
Hussein Avatar asked Jan 26 '26 09:01

Hussein


1 Answers

You need to wrap your embed code in a div See working code: http://jsfiddle.net/CTKhK/1

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

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

Edit: See if this convinces you: http://jsfiddle.net/CTKhK/2/

like image 76
Eric Fortis Avatar answered Jan 27 '26 22:01

Eric Fortis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!