SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Getting my feet wet with jQuery

    Hey all, thinking of messing around with jQuery and have the perfect project to start on.

    A site I'm working on has lots of technical data on enclosures - and on the linked page, in order to make the (ooh it was a blast from the past messing with them) tables more concise, I used <abbr> mark up for some headers.

    While it is lovely that the tooltip shows the content on hover, I'd quite like to sexy that up a little and use jQuery to throw in a pop up box with a little more styling, perhaps a fade in/out effect and the content of the <abbr> title.

    Any pointers fromjQuery veterans?

    TIA !

    H
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  2. #2
    SitePoint Wizard HarryR's Avatar
    Join Date
    Dec 2004
    Location
    London, UK
    Posts
    1,376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It might be worth having a look at some of the existing tool-tip plugins for jQuery which exist already and can be applied to almost any element you want.

    Check out the Tooltip plugin at Bassistance.de, which seem you can just apply it to <abbr> elements like:
    Code:
    $('abbr').tooltip({
        bodyHandler: function() { 
            return $($(this).attr("title")).html(); 
        }, 
    });

  3. #3
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You're a star Harry - it all looks far too easy! Thanks
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •