How to show a CSS class of a contribution form based on Stripe iFrame element via jquery?
You can use the Stripe element events to trigger something - see https://stripe.com/docs/js/element/events

We do that in the Stripe extension here: https://lab.civicrm.org/extensions/stripe/-/blob/master/js/civicrm_stripe.js#L281

There are some useful CiviCRM/Stripe extension events which help with frontend integrations and we are open to adding more: https://docs.civicrm.org/stripe/en/latest/events/