drop down menu - I want to disable it as soon as a value from dropdown has been selected -


i have drop down menu few options , want enable selected portion , disable other portions once select value dropdown using php.

are looking this?

var ddl = $('#test');    ddl.on('change', function()    {      if (ddl.find('selected').val() != '')        {          ddl.prop('disabled', true);        }    });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>  <select id='test'>      <option value=''>select</option>      <option value=''>a</option>      <option value=''>b</option>      <option value=''>c</option>  </select>


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -