Jump to content
Search Community

Toggle an input's checked "value"

Robert Wildling test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi, fellow GSAPers!

I wonder if you could tell me, whether it is possible to change a :checked value (or is it in fact a pseudo-class?). I did find some entries here and studied the codePens, too, but it seems the CSSRulePlugin is made for :before and :after?
 

In the example pen provided I tried several options, but to no avail.

 

And since I touch the subject, please allow me 2 related question:

 

1. Is CSSRulePlugin integrated in TweenMax TimelineMax or not? I checked the node folder, and the file is there, but it seems it has to be included separately? (I am still using v1.20)

 

2. This is not GSAP related, but I hope you can clarify this for me anyway: how can I inspect the :checked value of a checkbox in the Chrome DevTools? (I did google, really!)

 

Thank you!

See the Pen gddPyo by rowild (@rowild) on CodePen

Link to comment
Share on other sites

2 hours ago, Robert Wildling said:

But... I still don't know, how to use DevTools to check the "checked" status... would great, if you could drop a hint!

 

There's a bunch of ways. You can set a break point in the Sources debugger and check the value of anything in memory at that time. Or you can just select your element in the console, and print out its checked status.

 

OokfvFW.jpg

 

  • Like 4
Link to comment
Share on other sites

Nope. .checked is a property of the input. :checked is a pseudo class representing the state of the input, and would be applied based on the value of the property.

 

I'd imagine it would be pretty easy to get past a "I'm not a robot" checkbox in a CAPTCHA if all a spammer needed to do was apply a pseudo class.

 

 

 

  • Like 7
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...