I am trying animate child of element dynamically on button click.
Here is the code for selecting the nth-child
I am passing ${c} as parameter to function.
var child = CSSRulePlugin.getRule(`.main-overlay .child:nth-child(${c})`)
console.log(child)
TweenLite.to(child, {duration: 1.4, width: '100%', ease: "expo.inOut", stagger: 0.4})
But child is undefined, What is wrong with my code?