Find focused input fields with jQuery
-
Hey,
I am running on Ninja Forms 3.0.27. I try to find input fields with jQuery based on whether they are focused or not. I approach this with the following script:
$( 'input' ).on( 'focusin', function() { $(this).closest( '.field-wrap' ).addClass( 'focus' ); }); $( 'input' ).on( 'focusout', function() { if ( $(this).val()=='') $(this).closest( '.field-wrap' ).removeClass( 'focus' ); });
This used to work prior to Version 3. It is still working with own input fields I setup for testing outside a Ninja Form. Based on this I assume there is nothing wrong with the script itself. However I don’t get the script running inside a version 3 Ninja Form. The script simply don’t find the inputs inside a ninja form. Any ideas?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Find focused input fields with jQuery’ is closed to new replies.