Showing Tooltip For A Checkbox Inside A Modal
I have a modal and inside that modal I have a checkbox which is acting like a switch button.I want to show a tooltip for that checkbox when I will hover on it.How to do this . Titl
Solution 1:
If you want to display the title as a tooltip, you can do something like this.
input {
position: relative;
}
input::after {
content: attr(title);
display: block;
/* just for demo purposes :) */transition: all .3s;
opacity: 0;
position: absolute;
background: tomato;
color: white;
padding: 0.5rem1rem;
bottom: -3rem;
}
input:hover::after{
opacity: 1;
}
<divclass="bootstrap-switch bootstrap-switch-wrapper bootstrap-switch-on bootstrap-switch-id-chkSyncType bootstrap-switch-animate"style="width: 161.818px;"><divclass="bootstrap-switch-container"style="width: 240px; margin-left: 0px;"><spanclass="bootstrap-switch-handle-on bootstrap-switch-success"style="width: 80px;"> Auto </span><spanclass="bootstrap-switch-label"style="width: 80px;"> </span><spanclass="bootstrap-switch-handle-off bootstrap-switch-default"style="width: 80px;"> Manual </span><inputid="chkSyncType"title="mytooltip"type="checkbox"class="make-switch"data-on-color="success"data-on-text=" Auto "data-off-text=" Manual "value="false"checked="checked"></div></div>
Post a Comment for "Showing Tooltip For A Checkbox Inside A Modal"