@mattstuddert
Posted
Awesome work on this challenge, Kong! You can definitely achieve this functionality without using JS in a "non-hacky" way. To do this, you'd need to re-structure your HTML so that the input
is a sibling of the .pricing-table-container
element. From there you can use the general sibling selector (~
) combined with the :checked
pseudo-selector to update the content. It would look something like this: input:checked ~ .pricing-table-container .basic-price { display: block }
.
Let me know if you have any questions. Keep up the great work! 👍
@kmongy
Posted
@mattstuddert Ah that's it! I forget about the pseudo-selectors all the time. Thanks for the reminder and advice!
@mattstuddert
Posted
@kmongy no problem at all! 🙂