|
//DropDownList rendering
var statusDropDownListObj = new ej.dropdowns.DropDownList({
dataSource: statusDM,
fields: { text: 'StatusName', value: 'Id', id: 'Id' },
placeholder: 'Selezionare lo stato del paziente',
width: "100%",
index: 0,
cssClass: "patientStatus" //specific cssClass used for tooltip rendering
});
statusDropDownListObj.appendTo('#patientStatus');
var ttPatientStatus = new ej.popups.Tooltip({
//Set tooltip content
content: 'Stato del paziente'
});
ttPatientStatus.appendTo('.patientStatus'); //DropDownList cssClass selector
|
|
<div>
<h1>EJ2 Tooltip demo</h1>
<ejs-dropdownlist id="gender" locale="it" cssClass="genderTT">
<e-dropdownlist-fields text="GenderName" value="Id" id="Id"></e-dropdownlist-fields>
</ejs-dropdownlist>
<script>
document.addEventListener('DOMContentLoaded', function () {
var ttPatientGender = new ej.popups.Tooltip({
//Set tooltip content
content: 'Sesso'
});
ttPatientGender.appendTo('.genderTT');
});
</script>
</div> |