{"id":799,"date":"2008-04-15T11:28:23","date_gmt":"2008-04-15T09:28:23","guid":{"rendered":"http:\/\/planetozh.com\/blog\/?p=799"},"modified":"2008-04-15T11:30:38","modified_gmt":"2008-04-15T09:30:38","slug":"how-to-use-wordpress-25-tooltips","status":"publish","type":"post","link":"https:\/\/planetozh.com\/blog\/2008\/04\/how-to-use-wordpress-25-tooltips\/","title":{"rendered":"How-To: Use WordPress 2.5 Tooltips"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/planetozh.com\/blog\/wp-content\/uploads\/2008\/04\/tooltip.gif\" alt=\"\" title=\"tooltip\" width=\"200\" height=\"89\" class=\"alignleft size-full wp-image-797\" \/>Go to your blog admin area, head to the &quot;Write&quot; page, move your mouse over the &quot;Add media&quot; tiny icons: you probably had noticed it already, WordPress 2.5 comes with a neat tooltip function. Using it in your own plugins is so easy that a hamster could do it.<\/p>\n<p>First, in the HTML output of your plugin page, add a new classname &mdash; say &quot;givemesometips&quot; &mdash; to some elements, and give them a meaningful title.<\/p>\n<div class=\"igsh-code-box\" id=\"ig-sh-1\"><pre class=\"language-markup line-numbers\" data-no-optimize=\"1\" data-cfasync=\"false\"><code class=\"language-markup\">&lt;p&gt;The question mark hides a tooltip! &lt;span class=&quot;givemesometips&quot; title=&quot;Hello, I am a tip&quot;&gt;?&lt;\/span&gt;&lt;\/p&gt;\r\n&lt;p&gt;This image too! &lt;img src=&quot;someimage.gif&quot; alt=&quot;some image&quot; title=&quot;I am a tip, too!&quot; class=&quot;givemesometips&quot; \/&gt;&lt;\/p&gt;<\/code><\/pre><\/div>\n<p>Now, somewhere in your plugin page, add this Javascript call:<\/p>\n<div class=\"igsh-code-box\" id=\"ig-sh-2\"><pre class=\"language-markup line-numbers\" data-no-optimize=\"1\" data-cfasync=\"false\"><code class=\"language-markup\">&lt;script type=&quot;text\/javascript&quot;&gt;\r\njQuery(document).ready( function() {\r\n\tjQuery(&#039;.givemesometips&#039;).tTips(); \/\/ tooltipize elements with classname &quot;givemesometips&quot;\r\n});\r\n&lt;\/script&gt;<\/code><\/pre><\/div>\n<p>And that&#39;s it. If your hamster cannot do this, consider upgrading it! For your convenience, here is a sample dummy plugin with <a href=\"https:\/\/planetozh.com\/blog\/wp-content\/uploads\/2008\/04\/tooltip_example.zip\">tooltip examples<\/a> in the page it creates under the Setting menu. Have fun!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go to your blog admin area, head to the &quot;Write&quot; page, move your mouse over the &quot;Add media&quot; tiny icons: you probably had noticed it already, WordPress 2.5 comes with a neat tooltip function. Using it in your own plugins is so easy that a hamster could do it. First, in the HTML output of your plugin page, add a\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[297,245,277],"class_list":["post-799","post","type-post","status-publish","format-standard","hentry","category-published","tag-tooltip","tag-wordpress","tag-wordpress-snippet"],"_links":{"self":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/comments?post=799"}],"version-history":[{"count":0,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/posts\/799\/revisions"}],"wp:attachment":[{"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/media?parent=799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/categories?post=799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planetozh.com\/blog\/wp-json\/wp\/v2\/tags?post=799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}