Results 1 to 2 of 2

Thread: Two small comments on Speech Bubbles Tooltip

  1. #1
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Two small comments on Speech Bubbles Tooltip

    1) Script Title:
    Speech Bubbles Tooltip

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...lestooltip.htm

    3) Describe problem:

    (a) This first comment is not a problem - merely some information. My reference anchor (to which I wanted to apply the speechbubble) was a tweet link which already had a class attribute ("twitter-share-button"), and I found that adding the addspeech class to that attribute did not work. So I wrapped the reference anchor with <p> tags (which I wanted to do anyway), and applied the addspeech class to the <p> wrapper. Works fine, but I had to remember to change, in the calling javascript:

    $('a.addspeech').speechbubble

    to

    $('p.addspeech').speechbubble


    (b) In defining the content of the speechbubble, I used Method 1, with the simple title attribute. I would have preferred to use the speechdata.txt Method 2, but the 'rel' attribute is not recognised as valid in html5. (Although it does validate in html4 strict.) Is there an alternative to 'rel'?

    Btw, great script, and here's my speechbubble application:
    http://www.clag.org.uk/beam.html

  2. #2
    Join Date
    Aug 2004
    Posts
    9,894
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    Hi:
    Regarding a), there shouldn't be any reason why you can't reference the link directly through its class name, such as:

    Code:
    $('a.twitter-share-button')
    Regardless, for b), in HTML5 you can use the custom attribute data-something="value" inside elements. If you choose to go this route, the .js file of the script needs to be modified to look for this attribute instead. If you need help with that, just let me know.
    DD Admin

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
  •