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 971451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:58:06+00:00 2026-05-16T02:58:06+00:00

I have an SVG file within an object tag displaying in a table cell,and

  • 0

I have an SVG file within an object tag displaying in a table cell,and I want to make the SVG draggable within the table cell using JQuery’s Draggable. The code–minus the confusing bits in the tag, looks like this:

<div id="container">
<div id="box">
  <table align="center" border="1">
      <tr>
          <td valign="middle">button</td>
          <td valign="top" id="objtd">
              <div id="objdiv1">
                  <object id="svgobject1">blah, blah</object>
              </div>
          </td>
          <td valign="middle">button</td>
      </tr>    

If I set the tag itself as draggable, draggable doesn’t work. If I wrap the tag in a , and make the draggable, I can drag using the margin of the div, not the SVG itself. I tried setting the handle of the to the SVG object like this:

$('#objdiv1').draggable({ handle: '#svgobject1' });

but that failed as well.

Is there any way to make the SVG object draggable by clicking and dragging the SVG itself?

I set up an example here in case that helps see what I’m talking about.

  • 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-16T02:58:06+00:00Added an answer on May 16, 2026 at 2:58 am

    HTML content doesn’t get to see mouse events on the contents of <object>. Scripts in the page can only access mouse interaction data if the plug-in responsible deliberately makes it available through a custom interface.

    I suggest including the SVG content as part of the page itself, rather than using <object>. This means you’ll have to serve the page as application/xhtml+xml, and add a namespace for the SVG elements. Example. With inline SVG, the SVG elements themselves respond to mouse events and can be scripted just like the HTML elements.

    The drawback of inline SVG is that it won’t work on IE with the SVG plug-in. But then no-one has used the plug-in for years anyway, and IE9 will support inline SVG too.

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

Sidebar

Related Questions

I have fairly large script within an .svg file and I'd like to get
I have a SVG file that I want to extend by adding onclick handlers
I have a svg file of 100x100 pixels (for example). I am using Batik.
I have a .svg file that has the following code: <svg version=1.1 x=0 y=0
I have a C# web application which generates SVG code using RaphaelJS , which
I have the following code in a sample file: #include SkCanvas.h #include SkDevice.h #include
I have an SVG file inside HTML, and one of the things I've heard
I have this SVG file: <?xml version=1.0 encoding=utf-8?> <!-- Generator: Adobe Illustrator 15.0.0, SVG
I have an SVG file that contains several elements (like path, circles, rectangles, etc.).
a. i have a huge SVG file 2. i have objects in the SVG

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.