Home » Jquery » javascript – How can I fire an event when focusing on a form in an iframe using jQuery-Exceptionshub

javascript – How can I fire an event when focusing on a form in an iframe using jQuery-Exceptionshub

Posted by: admin February 24, 2020 Leave a comment

Questions:

I’m building an application using jQuery. This application has a form and I want to know when a user focuses on any one of the fields in the form by firing an event. Sounds easy? Only problem – the form is in an iframe which means I can use the standard $( "input" ).focus(function() {}) type selector.

Any ideas on how to accomplish this using jQuery or vanilla Javascript?

Edit: The content is on the same page

How to&Answer: