You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Different styles for different tooltips on the same page Created May 26, 2010

This thread is solved

Views: 1876     Replies: 14     Last reply Aug 23, 2010  
You must login first before you can use this feature

SkiFreak

Posts: 2

Registered:
May 26, 2010

Different styles for different tooltips on the same page

Posted: May 26, 2010

Is it possible to have tooltips on the same page with different styles?
I cannot find a way to use a different class than the default ".tooltip" class.
The only way that I have been able to do this is to download just the minimum required JavaScript for the tooltip, rename the file and do a search and replace, replacing "tooltip" with another name, then creating a new class with the name used as the replacement.

Is there a simpler/better way to do this?

el_jose

Posts: 2

Registered:
May 27, 2010

» Different styles for different tooltips on the same page

Posted: May 27, 2010

Reply to: Different styles for different tooltips on the same page, from SkiFreak
I'd like to know this as well!

how to put more different tooltip styles on the same page?

thanks in advance.

bkausbk

Posts: 4

Registered:
May 21, 2010

» Different styles for different tooltips on the same page

Posted: May 27, 2010

Reply to: Different styles for different tooltips on the same page, from SkiFreak
What about creating different style sheets for the trigger element and making tooltip class depending on them?

a.tooltip-red {}
a.tooltip-red + div.tooltip {background-color: red;}
a.tooltip-blue {}
a.tooltip-blue + div.tooltip {background-color: blue;}
This should create tool tips with different background color.
$("a.tooltip-red").tooltip({});
$("a.tooltip-blue").tooltip({});
Greets,
bkausbk

SkiFreak

Posts: 2

Registered:
May 26, 2010

» » Different styles for different tooltips on the same page

Posted: May 27, 2010

Reply to: » Different styles for different tooltips on the same page, from bkausbk
I will try this as an option, thanks.

It would still be nice if you could simply use a different class to have a different effect, and not be confined to using the .tooltip class.

el_jose

Posts: 2

Registered:
May 27, 2010

» » Different styles for different tooltips on the same page

Posted: May 27, 2010

Reply to: » Different styles for different tooltips on the same page, from bkausbk
the thing is that i'd like different tooltip options (eg. positioning) for the second tooltip on the same page. not just different css style.

how to do that? that's the question.

leafeon

Posts: 9

Registered:
Aug 4, 2010

» » » Different styles for different tooltips on the same page

Posted: Aug 4, 2010

Reply to: » » Different styles for different tooltips on the same page, from el_jose
yes i would also love to do this. i am trying to get different custom tooltips to display over different images. not just a different background color but different image completely.

Also, with each different tooltip come different positioning. Is this at all possible????

I have seen protips tooltips. Every tooltip on the site is different over every image. I want to know how this is done....

xRaMx

Posts: 8

Registered:
Mar 31, 2010

» Different styles for different tooltips on the same page

Posted: Aug 4, 2010

Reply to: Different styles for different tooltips on the same page, from SkiFreak
You can set the tooltip class using the tipClass configuration option.

For example .. I do the following:



$(".has-tooltip-right").tooltip({
        effect: 'slide',
        direction: 'right',
        bounce: true,
        offset: [0, -20],
        predelay: 3000,
        position: 'center right',
        opacity: .99,
        tipClass: 'tooltip-right',
        onShow: function() {
            this.getTip().animate({ opacity: 1 }, 2000);
        }
    });

    $(".has-tooltip-left").tooltip({
        effect: 'slide',
        direction: 'left',
        bounce: true,
        offset: [0, 20],
        predelay: 3000,
        position: 'center left',
        opacity: .99,
        tipClass: 'tooltip-left',
        onShow: function() {
            this.getTip().animate({ opacity: 1 }, 2000);
        }
    });


leafeon

Posts: 9

Registered:
Aug 4, 2010

» » Different styles for different tooltips on the same page

Posted: Aug 4, 2010

Reply to: » Different styles for different tooltips on the same page, from xRaMx
Do you have a demo? I would love to see one cause I'm just having a tough time....

xRaMx

Posts: 8

Registered:
Mar 31, 2010

» » » Different styles for different tooltips on the same page

Posted: Aug 4, 2010

Reply to: » » Different styles for different tooltips on the same page, from leafeon
Nothing I can show. The above example assumes you have the following in your css file:



.tooltip-left
{
	display: none;
	font-size: 15px;
	height: 60px;
	width: 171px;
	padding: 25px;
	color: #ffffff;
	background: transparent url('../../../Content/black_arrow_left.png');
}

.tooltip-right
{
	display: none;
	font-size: 15px;
	height: 60px;
	width: 171px;
	padding: 25px 25px 25px 30px;
	color: #ffffff;
	background: transparent url('../../../Content/black_arrow_right.png');
}


And your triggers would have to include either has-tooltip-left or has-tooltip-right as a class.

leafeon

Posts: 9

Registered:
Aug 4, 2010

» » » » Different styles for different tooltips on the same page

Posted: Aug 4, 2010

Reply to: » » » Different styles for different tooltips on the same page, from xRaMx
o thanks i get it now!!

leafeon

Posts: 9

Registered:
Aug 4, 2010

» » » » » Different styles for different tooltips on the same page

Posted: Aug 5, 2010

Reply to: » » » » Different styles for different tooltips on the same page, from leafeon
IF ANYONE WANTS A DEMO. CHECK OUT MY SITE wolfmecca.limewebs.com

greenbluewave

Posts: 6

Registered:
Aug 6, 2010

Dynamic

Posted: Aug 10, 2010

Reply to: » » » Different styles for different tooltips on the same page, from xRaMx
With the example code above, how would one alter the code to also make it dynamic so that it if the browser window blocks the view it comes up top or bottom to be seen properly?

randyfyfe

Posts: 17

Registered:
Aug 17, 2010

» Dynamic

Posted: Aug 17, 2010

Reply to: Dynamic, from greenbluewave
@greenbluewave

is this what you are talking about?
http://flowplayer.org/tools/demos/tooltip/dynamic.html

or something else?

greenbluewave

Posts: 6

Registered:
Aug 6, 2010

» » Dynamic

Posted: Aug 22, 2010

Reply to: » Dynamic, from randyfyfe
@randyfyfe

Yes, that's it exactly. :) I was wondering how to add that dynamic quality to the code above.

randyfyfe

Posts: 17

Registered:
Aug 17, 2010

» » » Dynamic

Posted: Aug 23, 2010

Reply to: » » Dynamic, from greenbluewave
good to hear im helping...

did you have any problems figuring out?