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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:59:00+00:00 2026-06-17T13:59:00+00:00

I have an svg graphics inserted in the page with an embed or object

  • 0

I have an svg graphics inserted in the page with an embed or object tag:

<object data="graphics.svg" type="image/svg+xml" id="graphics" />

The image is loading properly and I can see its SVG structure with the browser debugger. I see all the elements ids and attributes but it seems to me there is no way to select those elements with my scripts on page:

$('#graphics path').length; // 0 (jQuery)
$('path').length; // 0 anyway

Is it possible to browse the graphics elements as usual?

  • 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-06-17T13:59:01+00:00Added an answer on June 17, 2026 at 1:59 pm

    It will show up as a separate document, similar to an iframe. You can access it like this:

    var svg = document.getElementById('graphics').contentDocument
    

    Note that it is important to wait until the svg file is loaded; you might want to put your code in the object element’s onload event handler, like this:

    <object data="graphics.svg" type="image/svg+xml" id="graphics" />
    <script>
      document.getElementById('graphics').addEventListener('load',function(){
        var svg = document.getElementById('graphics').contentDocument
        // do stuff, call functions, etc.
      })
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an object tag on my page with SVG graphics in it: <object
I have a vector graphics .svg to create a image for iPhone. I know
I have a graphics page which shows SVG graphics. I am using Raphael graphics
I have an HTML5 page using CSS3 and SVG graphics in development. I tried
svg is an xml based graphics and you can add JavaScripts to it. I
I have this SVG file: <?xml version=1.0 encoding=utf-8?> <!-- Generator: Adobe Illustrator 15.0.0, SVG
I have SVG graphics (just text) between html <body> tags. I need the size
Hi I have the following SVG file: <?xml version=1.0 encoding=utf-8?> <!DOCTYPE svg PUBLIC -//W3C//DTD
When I embed SVG (inlined XML) in a table cell, no matter what I
In my Android application I have created an SVG image converter class. It parses

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.