Hello,
I have the following HTML:
- <div class="Field">
- <input type="text" name="phone" />
- </div>
To blur the div when the input has focus I have the following:
- $('form :input').focus(function() {
- $(this).closest('div.Field').addClass('Hover');
- }).
- blur(function() {
- $(this).closest('div.Field').removeClass('Hover');
- });
The problem is that now I have a div.Field with TinyMce so an iframe inside it. Something like:
- <div class="Field">
- <iframe>
- <html>
- <head></head>
- <body>Focus somewhere here</body>
- </html>
- </iframe>
I need to blur the div when the mouse "focus" the iframe body.
And of course blur out when it doesn't.
How can I add this functionality to my code?
I tried a few changes but none of them worked.
Thanks,
Miguel