Display popup balloon over a Label
I would like to display a small message to the user, style those when hovering, if I'm not mistaken it would be the attribute
Alt= "my message"
But I'm using asp. net-mvc-5 and I'm finding it hard to do. My message, I would like it to appear in @ Html.LabelFor , and also wanted it to be a fixed message, I believe that with CSS, jquery or javascript I can do, but I did not find anything that help.
<div class="form-group">
@Html.LabelFor(model => model.Celular, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Celular, new { htmlAttributes = new { @class = "form-control celular", id = "txt-tel" } })
@Html.ValidationMessageFor(model => model.Celular, "", new { @class = "text-danger" })
</div>
</div>
1
Author: Fabio Souza, 2016-11-11
1 answers
What you want is a Tooltip. There are several libraries that do this. Possibly you want some that behaves like this here .
Tooltips are in JS, so independent of ASP.NET MVC. The use is made as follows:
<span class="tooltip" onmouseover="tooltip.pop(this, 'Este é meu texto na tooltip.')">
Exemplo de texto com Tooltip
</span>
1
Author: Leonel Sanches da Silva, 2016-11-11 20:03:53