Tooltips
Tooltips are provided by the C1 MVC core. They are not controls, but popups containing HTML that appear when the mouse hovers over designated elements.
You can associate a tooltip with one or more elements on the page using the Tooltip.setTooltip method.
And this paragraph has a span with a tooltip and another span with a different tooltip.
The buttons below also have tooltips:
The setTooltip method a ssigns tooltip content to given elements on the page.
The same tooltip may be used to display information for any number of elements on the page. To remove the tooltip from an element, call the setTooltip method and specify null for the content.
1 2 3 4 5 6 7 8 9 10 | // This file locates: "Scripts/Lesson/C1Mvc/Tooltip.js". c1.documentReady(function () { var tt = new wijmo.Tooltip(); tt.setTooltip( '#setTooltip' , '#setTooltipDocs' ); tt.setTooltip( '#theSpan' , 'This is the <b>first</b> span.' ); tt.setTooltip( '#theOtherSpan' , 'This is the <b>second</b> span.' ); tt.setTooltip( '#btnAddNew' , 'Click to add 1,000 items using the <b>addNew</b> method.' ); tt.setTooltip( '#btnPush' , 'Click to add 1,000 items using the <b>push</b> method.' ); tt.setTooltip( '#btnPushDefer' , 'Click to add 1,000 items using the <b>push</b> method<br>within a <b>deferUpdate</b> block.' ); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 | using System.Web.Mvc; namespace LearnMvcClient.Controllers { public partial class C1MvcController : Controller { // GET: Tooltip public ActionResult Tooltip() { return View(); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | < h1 > @Html .Raw(Resources.C1Mvc.Tooltip_Title) </ h1 > < p > @Html .Raw(Resources.C1Mvc.Tooltip_Text1) </ p > < p > @Html .Raw(Resources.C1Mvc.Tooltip_Text2) </ p > < p > @Html .Raw(Resources.C1Mvc.Tooltip_Text3) </ p > < p > @Html .Raw(Resources.C1Mvc.Tooltip_Text4) </ p > < button id = "btnAddNew" class = "btn btn-default" > @Html .Raw(Resources.C1Mvc.Tooltip_Text5) </ button > < br > < button id = "btnPush" class = "btn btn-default" > @Html .Raw(Resources.C1Mvc.Tooltip_Text6) </ button > < br > < button id = "btnPushDefer" class = "btn btn-default" > @Html .Raw(Resources.C1Mvc.Tooltip_Text7) </ button > < div style = "display:none" > < div id = "setTooltipDocs" > < p > @Html .Raw(Resources.C1Mvc.Tooltip_Text8) </ p > < p > @Html .Raw(Resources.C1Mvc.Tooltip_Text9) </ p > </ div > </ div > |