How can i set wait time for this function.
function UpdateMedicaitonHistory(data) {
MedicaitonHistoryGrid();
//set a wait time to finish MedicaitonHistoryGrid() like for 3 seconds
// then execute the below code.
if ($("#MedHistoryGridSec").is(":visible")) {
alert("yes we have grid");
}
else{
alert("No Grid");
}
}
Best Answer
You can use
setTimeout
: