Search code examples
jqueryformsradio-button

JQuery : How to know if input type is not radio


Can anyone help me with a JQuery syntax issue?

This test works fine:

if ( $('input[name="'+ Field +'"]').is((':radio')) ) { do something }

But, I would like to test if the input is NOT radio and, honestly, I'm struggling.

Sorry for my poor English.

Best regards


Solution

  • if ( $('input[name="'+ Field +'"]').is(':not(:radio)')) { do something }