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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:40:45+00:00 2026-05-26T17:40:45+00:00

I have a SVG create with Raphael 2.0 which look like this : <div

  • 0

I have a SVG create with Raphael 2.0 which look like this :

<div class="stave">
<svg height="342" version="1.1" width="512" xmlns="http://www.w3.org/2000/svg"
style="overflow: hidden; position: relative;" viewBox="0 410 1300 80"
preserveAspectRatio="meet">
........
</svg>
</div>

i just want to set an ID to the svg tag! How can i do it? JQUERY or RAPHAEL 2.0?
i have see many answers but none works for me.

Thank you for helping

  • 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-26T17:40:46+00:00Added an answer on May 26, 2026 at 5:40 pm

    With jQuery you can use element selector and :nth-child().

    Something like this: (jsFiddle)

    <div class="frame">
        <div>div1</div>
        <div>div2</div>
        <div>div3</div>
    </div>
    <script type="text/javascript">
        $('div').css({'font-weight':'bold'});
        $('.frame div:nth-child(2)').attr("id","newId");
        $('#newId').css({'color':'#f30'})
    </script>
    

    Of course, in your case, selector would be $('svg')

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

Sidebar

Related Questions

I am attempting to create an arrow that looks like this using SVG elements:
I have made a SVG image, or more like mini application, for viewing graphs
I have a php script (generator.php) which generates certain HTML/XML/SVG depending on various conditions.
I have a simplr svg-graph and I'm trying to create a simple tooltip-popup for
I want to create inline SVG graphics using Javascript. However, it seems like createElementNS
This happens in Firefox, but not in Google Chrome. I create an SVG 'Image'
I have code that generates a data-driven SVG graph and I'd like to display
I have a JSF 2 application which creates some SVG content. How can i
I have an SVG that I will add elements to. And on mousemove this
Does anybody have any experience with the Raphael.js SVG library? I'm using Raphael.js to

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.