Solved

Need help figuring out java script for bubbletip posted by Google.

Posted on 2013-05-14
3
276 Views
Last Modified: 2013-05-15
Hello, I need a Java script Expert to help me out. Basically I am using Java Script and html to create a popup tooltip/baloon.

I am using this code posted by google :
http://code.google.com/p/bubbletip/source/browse/trunk/BubbleTip/js/jQuery.bubbletip-1.0.6.js?r=14

Everything works well, however I need to be able to specifiy the width of the bubbletip, and I can't figure it out how to do that by looking at the Java Script code displayed at the URL posted.

In the code their is an options parameter that can be used to customize the tooltip. Yet nothing I can see about specifiying the width. Can someone take a look at this Java Script and figure out how to specify the width of the tooltip? Also I don't know how to specify a hard return for the text to be  displayed. However the width problem is my most urgent priority.

Here is an example of  how they are able to specifiy the tooltip options, for an actual code snippet. Yet, as I mentioned before, there is nothin I can see about sizing the tooltip.
$('#a1_down').bubbletip($('#tip1_down')
{
 
     deltaDirection: 'down',
 
     deltaPosition: 50,
 
     offsetTop: 20 })
0
Comment
Question by:brgdotnet
  • 2
3 Comments
 
LVL 4

Expert Comment

by:Finec
ID: 39166676
Hello,

First, try to use container element around your content.
For example, you can set the width of #tip1_down.
0
 
LVL 2

Author Comment

by:brgdotnet
ID: 39167078
I have no idea how to set the width. So I need help and maybe an example from someone who knows Java Script.
0
 
LVL 4

Accepted Solution

by:
Finec earned 300 total points
ID: 39167274
You can do this with CSS or with inline styles:

<div id="tip1_down" style="display: block; width: 500px;">Content</content>

Open in new window

or
<!-- CSS -->
<style type="text/css">
  .bubble { display: block; width: 500px; }
</style>

<!-- HTML -->
<div id="tip1_down" class="bubble">Content</content>

Open in new window

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now