Hi,
Apologies if this has already been answered but I couldn't find it anywhere.
Is it possible to set the scope for targets in gsap?
For example, imagine I have the following document:
<div id="static-stuff">
<p class="info-text">Blah blah blah etc</p>
</div>
<div id="animated-stuff">
<p class="info-text">Blah blah blah etc</p>
<p class="info-text">Blah blah blah etc</p>
<ol>
<li class="generic-small-text-class">Item 1</li>
<li class="generic-small-text-class">Item 2</li>
<li class="generic-small-text-class">Item 3</li>
<li class="generic-small-text-class">Item 4</li>
</ol>
</div>
and I want to create a complex timeline that animates lots of stuff in #animated-stuff.
I can either make every selector "#animated-stuff desired-selector", or I can give each element an ID
But assuming that the actual document is much more complicated, can I set (for example) gsap.timeline({targetScope: "#animated-stuff"}) and have all selectors in the timeline start at #animated-stuff?
Thanks for your help,
Matt