In: , ,
On: 2008 / 04 / 15 Viewed: 32805 times
Shorter URL for this post: http://ozh.in/hn

Go to your blog admin area, head to the "Write" page, move your mouse over the "Add media" 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 new classname — say "givemesometips" — to some elements, and give them a meaningful title.

HTML:
  1. <p>The question mark hides a tooltip! <span class="givemesometips" title="Hello, I am a tip">?</span></p>
  2. <p>This image too! <img src="someimage.gif" alt="some image" title="I am a tip, too!" class="givemesometips" /></p>

Now, somewhere in your plugin page, add this Javascript call:

HTML:
  1. <script type="text/javascript">
  2. jQuery(document).ready( function() {
  3.     jQuery('.givemesometips').tTips(); // tooltipize elements with classname "givemesometips"
  4. });
  5. </script>

And that's it. If your hamster cannot do this, consider upgrading it! For your convenience, here is a sample dummy plugin with tooltip examples in the page it creates under the Setting menu. Have fun!

Related posts

Shorter URL

Want to share or tweet this post? Please use this short URL: http://ozh.in/hn

Metastuff

This entry "How-To: Use WordPress 2.5 Tooltips" was posted on 15/04/2008 at 11:28 am and is tagged with , ,
Watch this discussion : Comments RSS 2.0.

33 Blablas

    Pages: [4] 3 2 1 » Show All

  1. 33
    WordPress 2.5: Integrating Tooltips into... United States »
    pingback on 15/Apr/09 at 3:35 pm # :

    [...] Full Article [...]

  2. 32
    Bitwire.TV » Blog Archive » ... United States »
    pingback on 17/May/08 at 12:57 am # :

    [...] WP 2.5 tooltips [...]

  3. 31
    subcorpus Maldives »
    commented, on 24/Apr/08 at 6:35 pm # :

    i usllay use a plugin called ... Wordpress Automatic Update to do my updates ...
    but this time i upgraded manually ...
    all went well for the most part ...
    some links broke ... but were easy to fix ...
    if anyone of you know how to get lightbox to work on 2.5 ...
    plz do drop me a line on my blog ...
    thanks ...

Pages: [4] 3 2 1 » Show All

Leave a Reply

Comment Guidelines or Die

  • HTML: You can use these tags: <a href=""> <em> <i> <b> <strong> <blockquote>
  • Posting code: Post raw code (no <> &lt; etc) within appropriate tags : [php][/php], [css][/css], [html][/html], [js][/js], [sql][/sql], [xml][/xml], or generic [code][code]
  • Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar.
  • Spam: Various spam plugins on patrol. I'll put pins in a Voodoo doll if you spam me.
  • I will mark as Spam test comments, all comments with SEO names (ie "My Cool Online Shop" instead of "Joe") or containing forum-like signatures.

Read more ?

Close
E-mail It