View Full Version : Two small comments on Speech Bubbles Tooltip

03-20-2012, 11:45 PM
1) Script Title:
Speech Bubbles Tooltip

2) Script URL (on DD):

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:




(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:

03-22-2012, 09:01 PM
Regarding a), there shouldn't be any reason why you can't reference the link directly through its class name, such as:


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.