Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7906017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:44:05+00:00 2026-06-03T10:44:05+00:00

In qTip1 you could easily style every single tooltip at runtime, but since qTip2

  • 0

In qTip1 you could easily style every single tooltip at runtime, but since qTip2 you can ‘only’ pass a CSS class to apply to the tooltip.

So ok this is cleaner, but is there still a way I can change the style (or at least the color) of a tooltip at runtime ?

I guess adding a <style> block in my rendered view defining a class and then using that class could work but I’d prefer a pure javascript way of doing it.

What do you think ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:44:06+00:00Added an answer on June 3, 2026 at 10:44 am

    You can change easily the class (and with this every style) at runtime with:

    $("#tip").qtip('option', 'style.classes', 'class-you-want');
    

    SEE my DEMO (It changes the tooltip style at runtime)

    RESULT

    enter image description here

    HTML

    <a href="#" id="tip">Tooltip for that</a><br>
    <a href="#" id="r">RED</a> - <a href="#" id="b">BLUE</a>​
    

    JavaScript

    $(function() {
        $("#tip").qtip({
        content: {
            text: "Test"
            }});
        $("#r").click(function() {
            $("#tip").qtip('option', 'style.classes', 'ui-tooltip-red');
        });
        $("#b").click(function() {
            $("#tip").qtip('option', 'style.classes', 'ui-tooltip-blue');
        });
    });​
    

    You can read more in the Documentation

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this wonderfull tooltip called qTip2. Loving it so far but has gotten
How to style the tooltips in qtip2 as in the qtip1 default? I liked
I am using qTip2 on my website but have some problems with the css.
$('.selector').qtip({ content: { text: function(api) { return $(this).children('.tip').clone(); } }, style: { classes: 'ui-tooltip-rounded',
I am using a tooltip plugin called qTip2. I would like to be able
Showing a 'share' link in a textfield within a tooltip using qTip2 . The
Am trying to get qtip2 working with a rails3 application. qtip's working great but
Can anyone recommend a good alternative to qTip, the jQuery tooltip plugin? I feel
I'm trying to have a qTip2 bubble created but not displayed at load time.
Hii i am using qTip 2 i want the class ui-tooltip-dark ui-tooltip-shadow but it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.