New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip is not working in materialize #4369
Comments
If it is working in a jsfiddle and not your main code you should look into how you are calling your dependencies. Are you sure you don't have any errors? |
In addition to what @acburst said. Are you using any other UI framework that might be conflicting the tooltip function? like jQueryUI, ... |
I can't get tooltips to work neither. It was working for me in version 0.97.7 but when I change the materialize.js to version 0.98.1 tooltips are not working (no error). |
@prachi708 and @CorentinMic Please provide a codepen, is the best way to see what is exactly happening and how could be resolved |
After multiples attempts, I figured out that it was my sass command to update the css file in the new version that hadn't worked. So I was using the old version css file. Tooltips are working in 0.98.1. Sorry for the inconvenience. |
CSS
.material-tooltip {
padding: 5px 20px 20px;
border-radius: 10px;
background: rgba(37, 36, 36, 0.9);
}
.material-tooltip .backdrop {
display: none !important;
}
.material-tooltip:after {
position: absolute;
content: " ";
top: 47.5%;
left: 0%;
margin-left: -12%;
width: 0;
height: 0;
border-style: solid;
border-width: 13px 0px 20px 13px;
border-color: rgba(37, 36, 36, 0.9) transparent transparent transparent;
}
SCRIPT
<script> txt="Error"; $(document).ready(function(){ $('.tooltipped').tooltip({delay: 50, html : true}); var anchorElement = $('#err'); anchorElement.attr('data-tooltip', txt); anchorElement.tooltip(); }); </script>It is working fine in JSFiddle but not in my main code
The text was updated successfully, but these errors were encountered: