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

  • Home
  • SEARCH
  • 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 365167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T13:30:41+00:00 2026-05-12T13:30:41+00:00

I am using jQuery 1.3.2, and I’m trying to select some elements in an

  • 0

I am using jQuery 1.3.2, and I’m trying to select some elements in an svg DOM element.

$('svg > defs > lineargradient')

However for some reason it does not select it, I know that I can access other items in the <svg> element since I have successfully retrieved an $(“svg > rect”).

My SVG DOM looks like this:

<svg width="975" height="385">
    <defs>
       <lineargradient id="raphael-gradient-0" x1="1.000" y1="1.000" x2="0.000" y2="0.000">
          <stop offset="0%" stop-color="#242b62"/><stop offset="9.090909090909092%" stop-color="#174a88"/>
          <stop offset="18.181818181818183%" stop-color="#0e60a3"/><stop offset="27.272727272727273%" stop-color="#0b66ab"/>
          <stop offset="36.36363636363637%" stop-color="#0870b7"/>
       ...
       </lineargradient>
       <lineargradient id="raphael-gradient-1" x1="1.000" y1="1.000" x2="0.000" y2="0.000">...</lineargradient>

    </defs>
    <circle cx="50" cy="40" r="10" fill="#ff0000" stroke="#000" transform=""/>
    <rect x="0" y="0" width="975" height="385" fill="url(#raphael-gradient-1)" stroke="none" transform="" style="opacity: 1;" opacity="1" fill-opacity="1"/>
</svg>

Is there any reason why jQuery 1.3.2 wouldn’t be able to select the <lineargradient> elements?

  • 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-12T13:30:41+00:00Added an answer on May 12, 2026 at 1:30 pm
    alert($('svg lineargradient').length);
    

    Working Demo

    EDIT:

    It appears that the > immediate child expression does not work, but if you specify a selector without this (if possible), it is fine in Firefox (but not IE). The following does work in IE however (tested in IE7)

    alert($('lineargradient').length);
    

    obviously, this will selecting the <lineargradient> elements that you want on a page slightly harder, but commands like slice() and eq() will allow you to get to them by position in the wrapped set.

    Writing your own filters for the Sizzle selector engine may yield the results you want.

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

Sidebar

Ask A Question

Stats

  • Questions 177k
  • Answers 177k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I'd use a more readable URL structure like this: /events/2009-09-29/0823/… May 12, 2026 at 3:33 pm
  • Editorial Team
    Editorial Team added an answer I think you could put a style="display:block" into the <ol>,<ul>,<li>… May 12, 2026 at 3:33 pm
  • Editorial Team
    Editorial Team added an answer This worked public class DocumentLink : Link { } public… May 12, 2026 at 3:33 pm

Related Questions

I am using jQuery 1.3.2, and I'm trying to select some elements in an
I am using jQuery 1.3.2 and I was wondering if anyone knew of a
I am using JQuery 1.3.2-min in a project to handle JavaScript animations, ajax, etc.
Problem: I am having trouble implementing a recursive image lazy load in all relevant
I am trying to make a form with some dynamic behavior. Specifically, I have

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.