when a user click on that the dropdown options are visible to them and a user can select from the available I want to simulate the visibility of options without manual clicking on dropdown element.
HTML code <select name="data" id = 'cohort' class="form-control" style = "width:215px; margin-left:20px; margin-bottom:8px ; height:30px" > <option value = 0>All</option> <option value = 1>Diseases</option> <option value = 2>Drugs</option> <option value = 3>Procedures</option> </select>
$("#cohort").trigger('open');
document.getElementById('cohort').click()
const element = document.getElementById("cohort"); const event = new MouseEvent("mousedown"); element.dispatchEvent(event);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)