0

What is my goal: When I click on a certain word (not in paragraph), I want a speech bubble full of info to appear.

So, I already have this bubble, I've made it using a "class" and CSS 3.

Can I, using some basic JavaScript, make my dream come true? I have no knowledge of JavaScript at all.

Is there a way of somehow putting my "bubble class" into "onclick"?

Thanks in advance.

Everything is an option as long as it works on IE =)

6
  • 1
    Hey Leo.. Interesting that you said this as a DREAM. never mind it is easy.Can you use jQuery or you just have to use javascript? Commented Aug 30, 2012 at 1:24
  • 1
    Is jQuery an option, or plain JavaScript only? Commented Aug 30, 2012 at 1:25
  • It might be tougher to achieve for someone who does not know the difference between Java and JS. Commented Aug 30, 2012 at 1:26
  • 1
    first step into making ur dream come true is post dat code :) Commented Aug 30, 2012 at 1:26
  • If you can describe it with words, you can program it in code. Isn't that a dream?? Commented Aug 30, 2012 at 1:30

4 Answers 4

2

There are many plugings for fulfill your requrement. This is a only a one solution. download bubbletip

You can see a demo here and some instruciton too

you really no need to click the word instead just hover is enough.

Sign up to request clarification or add additional context in comments.

Comments

0

Check out JQuery Tools. Their page on tooltips has some samples: http://jquerytools.org/demos/tooltip/dynamic.html

Disclaimer: I am not affiliated with JQuery Tools in any way, just found this doing some quick searching based on user's needs.

Comments

0

First, if you have several bubbles, you should give each of them a separate id attribute. The following javascript will make the bubble appear: document.getElementById("id_of_the_bubble").style.display = "none";

The following will make a bubble reappear: document.getElementById("id_of_the_bubble").style.display = "block";

Note: if you have the bubbles be by default with a different display other than block, then you should put it as that display instead of block.

Comments

0

Twitter Bootstrap framework

http://twitter.github.com/bootstrap/javascript.html#popovers

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.