AsKadir Posted January 25, 2021 Share Posted January 25, 2021 Hi all! I have an issue with input placeholder, I can't change its color using gsap properly, or is it impossible? Can you help me, please? Thanks in advance! See the Pen dypBQyR by ChicagoJostik (@ChicagoJostik) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted January 25, 2021 Solution Share Posted January 25, 2021 Several problems: Your jQuery object is totally empty - you can see that with console.log(input[0]), for example. So it's not selecting what you think it's selecting. JavaScript doesn't have any access to pseudo elements. That has nothing to do with GSAP. You can, however, use JavaScript to animate the actual CSS rule itself. Here's a fork that shows how to use CSSRulePlugin for that: See the Pen 7e04b6f35e1944046c17dc803151e46a?editors=0010 by GreenSock (@GreenSock) on CodePen Does that clear things up? 3 1 Link to comment Share on other sites More sharing options...
AsKadir Posted January 25, 2021 Author Share Posted January 25, 2021 @GreenSock Thanks a lot, Jack! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now