-
Notifications
You must be signed in to change notification settings - Fork 139
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
Custom HTML in Tooltip not working #104
Comments
@hem19 is that something that MaterializeCSS supports? |
@rubyboy yes MaterializeCSS supports this feature since 0.97.7 version. But I suppose it's the issue with there library only as mentioned in this issue - Dogfalo/materialize#3495 I guess the issue is not about supporting custom HTML, it has something to do with data-tooltip value not getting updated when variable's value is updating. Even though in DOM it shows the new value of data-tooltip but on hovering it only shows empty black rectangle. When I updated to 0.97.7 and gave custom HTML in data-tooltip itself, it works. For e.g, the below code shows Hello world with h4 and h5 class applied and with a line break between them. But when I bind data-tooltip with a variable 'message' like this, it doesn't work. On hovering the image I am only getting empty black rectangle. where 'message' is variable on the TS file whose value is as follows: |
Can confirm. data-tooltip attribute gets updated with the right value but the text inside the black tooltip box does not update. |
Please, what is the status of this ? |
I tried to put custom html inside materialize tooltip, but instead it is showing full text of the data-tooltip . Here is my code:
<img id="imgInSiteLogo" materialize="tooltip" class="left img-responsive tooltipped" src="Images/InsiteLogo.png" data-position="right" data-delay="50" data-html="true" data-tooltip="<div><h4>Hello</h4><h5>World</h5></div>">
I tried binding it to variable like this:
<img id="imgInSiteLogo" materialize="tooltip" class="left img-responsive tooltipped" src="Images/InsiteLogo.png" data-position="right" data-delay="50" data-html="true" [attr.data-tooltip]="message">
where 'message' is variable on the typescript value whose value is as follows:
message="<div><h4>Hello</h4><h5>World</h5></div>"
Both cases are not working for me. Here is one example to write custom html inside tooltip using jquery - https://fiddle.jshell.net/hcy8btaa/1/
I want to achieve same functionality in angular 2 without using jquery.
The text was updated successfully, but these errors were encountered: