User-1826049516 posted
Hi,
Where I am using .modal:visible I would like to exclude one particular one (has data-view=create). I know I can use .not() but I'd have to use it twice:
if( ( $( ".modal:visible" ).not( "[data-view='CREATE']" ).find( "div > input" ).prop( "disabled" ) === true && !$( e.target ).parents().is( ".modal-controls, .modal-menu" ) ) || !$( e.target ).parents().is( ".modal" ) ) {
$( ".modal:visible" ).not( "[data-view='CREATE']" ).find( "div > input:enabled" ).prop( "disabled", true ).end().find( ".modal-menu" ).fadeOut( function() {
$( this ).find( "a[data-control='modal']" ).show().end().find( "a[data-control='edit']" ).hide();
} );
}
Can I pass the first call to .modal:visible to the 2nd call as $( this ) in any way, or something else that doesn't require two .not()?
Thanks