Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4022616
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:29:51+00:00 2026-05-20T10:29:51+00:00

How can I enable dragging of an <embed> object on a webpage (with javascript)?

  • 0

How can I enable dragging of an <embed> object on a webpage (with javascript)? Normally, when I select some text or an image on a webpage, I am able to drag it around, and I want to do the same for the object.

Specifically, I want to be able to drag a YouTube video. I’m not concerned about dropping for now, and also I don’t want to use jQuery UI if at all possible. The YouTube embed looks like this

<embed id="movie_player" ... type="application/x-shockwave-flash" />

I’m writing a browser extension (for Chrome), so I have full access to the DOM and the browser.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:29:52+00:00Added an answer on May 20, 2026 at 10:29 am

    I think jQuery is the best here, it is also javascript and all you do is embed it to your website. And if you want a semi-transparent effect to view that you are dragging, I think you can add an event for a dragging handle. Use onMouseDown and onMouseUp. For example, this div is handle your youtube:
    The CSS for transparent is:

    opacity: .7; filter:Alpha(Opacity=70); whereby 0.7 and 70 is the opacity percent of element!

    [Example]:

    <div onMouseDown="this.style.opacity='0.7'; this.style.filter='Alpha(Opacity=70)';" onMouseUp="this.style.opacity='1.0'; this.style.filter='Alpha(Opacity=100)';"><br><embed something here></embed></div>.

    Ok, If you change your mind somehow and you want to use jQuery, give it a try, I promise it is extremely easy!

    First of all, embed this into your website:

    <script src="http://code.jquery.com/jquery-1.5.1.min.js"></script><script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>

    <script language="javascript" type="text/javascript">$(document).ready(function(){$(".drag").draggable();});</script>

    Secondly, give anything you want to drag a class “drag”, in this case:

    <div class="drag">YOUR YOUTUBE VIDEO EMBED HERE</div>

    Use it together with the semi-transparent effect, I think that all you need, and I hope this help.

    xx3004,

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how can i disable/enable dragging, zooming in a 'map' object. also how can i
I am developing a RIA application with JavaScript in Eclipse. How can I enable
How can I enable users to resize a panel at runtime by dragging a
How I can enable the drag and drop event on jlabel ? I have
how I can enable caching for a EntityDataSource object. is there anything like EnableCaching
I see that you can enable/disable using the EnableWindow method, but how do I
plz guide me how I can enable or disable asp.net validation controls using jQuery
I have a screen where you can enable/disable modules for my Android application. For
I'm looking for an add-in to VS2008 that can enable structural highlighting ( vertical
How can I enable mtrace() (and MALLOC_TRACE env) for a binary program without sources?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.