Skip to main content
Topic: Code Snippet not working (Read 1247 times) previous topic - next topic

Code Snippet not working

trying to hide this field when clicked.
but it won't work.
I just create a simple function to check whether it will work or not.

it is a radio selection, choosing 'Y' or 'N' only

$('#ctrl-hof').on('click', function(){
   $(this).hide();
});

Thanks.

 

Re: Code Snippet not working

Reply #1
it is okay now.
I got a sample from Mr. Willvin

$('input[type=radio]').change(function () {
    if ($(this).val() == 'N') {
        $('#ctrl-fgno').hide();
        } else {
         $('#ctrl-fgno').show();
        }
});

Thanks again Mr. Willvin