{"id":45,"date":"2017-02-17T20:01:59","date_gmt":"2017-02-17T20:01:59","guid":{"rendered":"http:\/\/wordpress.library.illinois.edu\/wp-training\/?page_id=45"},"modified":"2019-01-17T19:34:36","modified_gmt":"2019-01-17T19:34:36","slug":"tooltips","status":"publish","type":"page","link":"https:\/\/wordpress.library.illinois.edu\/wp-training\/shortcodes\/tooltips\/","title":{"rendered":"Tooltips"},"content":{"rendered":"<h2>When to use<\/h2>\n<p>Tooltips are small boxes that appear when a user hovers over or clicks special icons on your page. Tooltips may enhance the usability of a page by helping contextualize content on your page.<\/p>\n<h2>Basic usage:<\/h2>\n<p>[tooltip message=\"Some tooltip text.\"]<br \/>\nBy default, the <code>tooltip<\/code> will display a Font Awesome <code>question-circle<\/code> icon, and the tip will show when a user clicks the icon.<\/p>\n<ol>\n<li><strong>Open the tooltip shortcode:<\/strong><br \/>\n[tooltip<\/li>\n<li><strong>Add tooltip text using the <code>message<\/code> attribute and end the shortcode:<\/strong><br \/>\nmessage=&#8221;Some tooltip text.&#8221;]<\/li>\n<\/ol>\n<h3>Results<\/h3>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-blue-100 !sh-text-black \"><div><div class=\"\"><div class=\"shortcode sh-grid sh-grid-cols-1 md:sh-grid-cols-12 sh-gap-3\"><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h4>Code<\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n[tooltip message=\"Some tooltip text.\"]<\/div><\/div><\/div><\/div><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h4>Rendering<\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n<a tabindex=\"0\" data-toggle=\"popover\" data-content=\"Some tooltip text.\" data-trigger=\"hover focus\"><span class=\"fa fa-question-circle\" aria-hidden=\"true\" ><\/span><\/a><br \/>\n(Click to view)<br \/>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-red-200 !sh-text-red-800 \"><div><div class=\"\"><span class=\" fa fa-exclamation-triangle\" aria-hidden=\"true\"><\/span> Special characters, quotation marks, asterisks etc. in a <code>message<\/code> or <code>title<\/code> value must be entered as HTML entities. See examples below. More about HTML entities at <a href=\"https:\/\/www.w3schools.com\/html\/html_entities.asp\">W3 Schools<\/a><\/div><\/div><\/div><\/p>\n<h2>Attributes: <code>message, title, icon, position<\/code><\/h2>\n<h3><code>message<\/code> attribute<\/h3>\n<p>This is a required attribute. It&#8217;s behavior can be seen in our example. Please be sure to use HTML entities in place of quotation marks and special characters.<\/p>\n<h3><code>title<\/code> attribute<\/h3>\n<p><code>title<\/code> places a small title box above the the text given by the <code>message<\/code> attribute&#8217;s value. HTML entities are required for special characters.<\/p>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-blue-100 !sh-text-black \"><div><div class=\"\"><div class=\"shortcode sh-grid sh-grid-cols-1 md:sh-grid-cols-12 sh-gap-3\"><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h4>Code<\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n[tooltip message=\"&amp;quot;Some tooltip text in double quotation marks.&amp;quot;\" title=\"&amp;apos;A tooltip title in single quotation marks&amp;apos;\"]<\/div><\/div><\/div><\/div><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h4>Rendering<\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n<a tabindex=\"0\" data-toggle=\"popover\" data-content=\"\" data-trigger=\"hover focus\" title=\"&#039;A tooltip title in single quotation marks&#039;\"><span class=\"fa fa-question-circle\" aria-hidden=\"true\" ><\/span><\/a><br \/>\n(Click to view)<br \/>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n<h3><code>icon<\/code> attribute<\/h3>\n<p>By default, tooltips display the Font Awesome <code>question-circle<\/code> icon. The <code>icon<\/code> attribute lets users substitute the Font Awesome <code>info-circle<\/code> icon.<br \/>\n<div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-blue-100 !sh-text-black \"><div><div class=\"\"><div class=\"shortcode sh-grid sh-grid-cols-1 md:sh-grid-cols-12 sh-gap-3\"><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h4>Code<\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n[tooltip message=\"Some tooltip text\" icon=\"info-circle\"]<\/div><\/div><\/div><\/div><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h4>Rendering<\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n<a tabindex=\"0\" data-toggle=\"popover\" data-content=\"Some tooltip text.\" data-trigger=\"hover focus\"><span class=\"fa fa-info-circle\" aria-hidden=\"true\" ><\/span><\/a><br \/>\n(Click to view)<br \/>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n<h4>DEPRECATED, do not use\u00a0<strong><code>trigger<\/code><\/strong> attribute<\/h4>\n<p>As of 1\/17\/2019, the default behavior for triggering the tooltip is now on hover, focus, and click events. This update was made so keyboard users could always trigger the tooltip.<\/p>\n<h3><code>position<\/code> attribute<\/h3>\n<p>By default, tooltips display above the icon. By using the <code>position<\/code> attribute you can place text to the <code>position=\"right\"<\/code>, left: <code>position=left<\/code>, or below <code>position=\"bottom\"<\/code> the icon.<\/p>\n<h4><code>position=\"right\"<\/code><\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-blue-100 !sh-text-black \"><div><div class=\"\"><div class=\"shortcode sh-grid sh-grid-cols-1 md:sh-grid-cols-12 sh-gap-3\"><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h5>Code<\/h5>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n[tooltip message=\"Some tooltip text to the right of the icon\" position=\"right\"]<\/div><\/div><\/div><\/div><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h5>Rendering<\/h5>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n<a tabindex=\"0\" data-toggle=\"popover\" data-content=\"Some tooltip text to the right of the icon\" data-trigger=\"hover focus\"><span class=\"fa fa-question-circle\" aria-hidden=\"true\" ><\/span><\/a><br \/>\n(Click to view)<br \/>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n<h4><code>position=\"left\"<\/code><\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-blue-100 !sh-text-black \"><div><div class=\"\"><div class=\"shortcode sh-grid sh-grid-cols-1 md:sh-grid-cols-12 sh-gap-3\"><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h5>Code<\/h5>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n[tooltip message=\"Some tooltip text to the left of the icon\" position=\"left\"]<\/div><\/div><\/div><\/div><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h5>Rendering<\/h5>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n<a tabindex=\"0\" data-toggle=\"popover\" data-content=\"Some tooltip text to the left of the icon\" data-trigger=\"hover focus\"><span class=\"fa fa-question-circle\" aria-hidden=\"true\" ><\/span><\/a><br \/>\n(Click to view)<br \/>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n<h4><code>position=\"bottom\"<\/code><\/h4>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-blue-100 !sh-text-black \"><div><div class=\"\"><div class=\"shortcode sh-grid sh-grid-cols-1 md:sh-grid-cols-12 sh-gap-3\"><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h5>Code<\/h5>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n[tooltip message=\"Some tooltip text below the icon\" position=\"bottom\"]<\/div><\/div><\/div><\/div><div class=\"shortcode sh-col-span-6 sh-pb-3\"><\/p>\n<h5>Rendering<\/h5>\n<p><div class=\"shortcode sh-p-4 sh-rounded sh-drop-shadow-sm sh-bg-white !sh-text-black !sh-border  \"><div><div class=\"\"><br \/>\n<a tabindex=\"0\" data-toggle=\"popover\" data-content=\"Some tooltip text below the icon\" data-trigger=\"hover focus\"><span class=\"fa fa-question-circle\" aria-hidden=\"true\" ><\/span><\/a><br \/>\n(Click to view)<br \/>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When to use Tooltips are small boxes that appear when a user hovers over or clicks special icons on your page. Tooltips may enhance the usability of a page by helping contextualize content on your page. Basic usage: By default, the tooltip will display a Font Awesome question-circle icon, and the tip will show when [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"parent":24,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-45","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/pages\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/comments?post=45"}],"version-history":[{"count":14,"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/pages\/45\/revisions"}],"predecessor-version":[{"id":2885,"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/pages\/45\/revisions\/2885"}],"up":[{"embeddable":true,"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/pages\/24"}],"wp:attachment":[{"href":"https:\/\/wordpress.library.illinois.edu\/wp-training\/wp-json\/wp\/v2\/media?parent=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}