0

I'm trying to select the object that uniqueDomID-227 refers to in this line of code, but don't have any luck in doing so.

<path id="uniqueDomId-227" fill="#4F81BD" fill-opacity="1" stroke="#385D8A" 
stroke-opacity="1" stroke-width="1" stroke-linecap="flat" stroke-
linejoin="round" d="M0,0 L96,0 96,80 0,80Z" data-stroke-sharpened="true" 
transform="translate(0.5, 0.5)" data-accepts="events" data-
reactid=".0.0.3.2.0.1.0:$6APsFT39tH6.0.3:$c202.1:$c203.2.$0.$0.$0"></path>

I've tried using document.getElementById and jquery but no luck so far. I'm guessing I'm missing something, so any suggestions would be appreciated. This is from an Articulate Storyline course and trying to select an object to transform with Greensock.

There is no other unique ID for this element - there are multiple classes with duplicate names, so as far as I can see this is the only unique ID for the object.

Nick Smith
  • 311
  • 1
  • 8
  • 1
    `$("#uniqueDomId-227")`? – guradio Aug 11 '17 at 05:32
  • 1
    try `console.log($("#uniqueDomId-227").length)` if this returns 1, then it means you have the object. – Carsten Løvbo Andersen Aug 11 '17 at 05:33
  • https://stackoverflow.com/questions/29146763/on-click-svg-image-path-get-path-id – Tony Vincent Aug 11 '17 at 05:41
  • try `document.querySelector('#uniqueDomId-227')`. – Atty Aug 11 '17 at 05:42
  • Possible duplicate of [On click svg image path get path id?](https://stackoverflow.com/questions/29146763/on-click-svg-image-path-get-path-id) – Jithin Raj P R Aug 11 '17 at 05:44
  • 1
    Perhaps the id is being assigned after your running the code to select it. You can run a `setInterval` and check what @CarstenLøvboAndersen proposed until you get 1. Then cancel the interval and you can use GSAP's own selector code: `TweenLite.to("#uniqueDomId-227", 1, {})` – Rodrigo Aug 16 '17 at 02:53

0 Answers0