Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

if select option disabled jquerz

if($('#dropdownID option:selected').prop('disabled') == true){
// Put your own condition
}
Comment

jquery option not disabled

const opt = $('#select option:not(:disabled)'); // array with all options not disabled
const first = $($('#select option:not(:disabled)')[0]); // first option not disabled
Comment

how to disable option after select using jquery

//JS
$("#theSelect").change(function(){          
  var value = $("#theSelect option:selected").val();
  var theDiv = $(".is" + value);

  theDiv.slideDown().removeClass("hidden");
});


$("div a.remove").click(function () {     
  $(this).parent().slideUp(function() { $(this).addClass("hidden"); }); 
});

//HTML
<body>
<div class="selectContainer">
    <select id="theSelect">
        <option value="">- Select -</option>
        <option value="Patient">Patient</option>
        <option value="Physician">Physician</option>
        <option value="Nurse">Nurse</option>
    </select>
</div>
<div class="hidden isPatient">Patient <a href="#" class="remove" rel="Patient">remove</a></div>
<div class="hidden isPhysician">Physician <a href="#" class="remove" rel="Patient">remove</a></div>
<div class="hidden isNurse">Nurse <a href="#" class="remove" rel="Patient">remove</a></div>
</body>​
Comment

PREVIOUS NEXT
Code Example
Javascript :: string replace in javascript 
Javascript :: adding firebase to angular 
Javascript :: wordpress ajax url 
Javascript :: javascript get hour from date 
Javascript :: ajax datatable reload paging retained 
Javascript :: roblox headshot image js 
Javascript :: set time to zero in js date 
Javascript :: UpperCase every first letter in each word in str 
Javascript :: javascript pick multiple random from array 
Javascript :: jquery remove attribute 
Javascript :: jquery keep scroll position 
Javascript :: javascript transition 
Javascript :: javascript template string examples 
Javascript :: javascript add hours 
Javascript :: org.json.JSONException: End of input at character 0 of 
Javascript :: regex any char except 
Javascript :: react native position text in center of view 
Javascript :: jquery json object 
Javascript :: how to fetch the all input element id value 
Javascript :: javascript get last n characters of string 
Javascript :: fetch data flutter json 
Javascript :: node.js for windows 7 
Javascript :: check date format javascript 
Javascript :: regex for company name 
Javascript :: moment date without timezone 
Javascript :: get ip address js 
Javascript :: dart list files in directory 
Javascript :: sequelize order by 
Javascript :: react native scrollable 
Javascript :: jquery get all text inputs 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =