0
jQuery 1.3.2를 사용 중이며 svg DOM 요소에서 일부 요소를 선택하려고합니다. jQuery에서 lineargradient 오브젝트를 선택하지 않았습니다.
$('svg > defs > lineargradient')
그러나 그것을 선택하지 않는 어떤 이유로, 나는 성공적으로 $ ("SVG> RECT")를 검색 한 이후이 <SVG> 요소의 다른 항목에 액세스 할 수 있는지 알고있다.
내 SVG DOM
은 다음과 같습니다<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>
jQuery를 1.3.2은 <이 LinearGradient > 요소를 선택 할 수 없을 것입니다 어떤 이유가 있습니까?
흠, Internet Explorer에서 작동하지 않는 것 같습니다. – leeand00
그것은 IE8에서 "선형 그라디언트의 수가 0"이라고 말합니다. – leeand00
@ leeand00 - 지난주에 두 번이나 IE에서 테스트하지 않아서 잡혔습니다 (Firefox 사용 경향). jQuery가 사용하는 Sizzle Selector 엔진과 관련이 있습니다. –