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 3943828
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:49:41+00:00 2026-05-20T00:49:41+00:00

Hi, I am using qTip on my site and this is how the document

  • 0

Hi,

I am using qTip on my site and this is how the document ready function looks like :

    $.fn.qtip.styles.mystyle = { // Last part is the name of the style
       width: 200,
       background: '#ebf1ff',
       color: 'black',
       textAlign: 'center',
       border: {
          width: 1,
          radius: 4,
          color: '#AACCEE'
       },
       tip: 'bottomLeft',
       name: 'dark'
    }



   $('.controlTitleContainer .icon').qtip({
       content: $(this).find('.tooltip').html(),
        position: {
              corner: {
                 target: 'topRight',
                 tooltip: 'bottomLeft'
              }
           },
       style: 'mystyle'
    });

The first part is only for styling, the second part however is the one that will populate the qtip.

My HTML looks like this :

 <div class="controlTitleContainer">
      <div class="text">
           <label for="ModelViewAd_Title">Titel</label>
      </div>
      <div class="icon">
           &nbsp;<div class="toolTip">MyToolTipTest</div>
      </div>
  </div>

note : the class toolTip is set to Display : none, and the class=”icon” div vill be the one that shows the tooltip

I will have alot of html snippets like this on a page but it will contain diffrent data, what I need is the tooltip to show the current inner html of . Is this possible or do I have to generate a declaration of qtip for every HTML snippet like this?

Pleas Advice

BestRegards

  • 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-05-20T00:49:41+00:00Added an answer on May 20, 2026 at 12:49 am

    Why not have it like this?

    $(document).ready(function(){
        $.each($(".tooltip"), function(i,val){
            $.fn.qtip.styles.mystyle = { 
               width: 50,
               background: '#ebf1ff',
               color: 'black',
               textAlign: 'center',
               border: {
                  width: 1,
                  radius: 4,
                  color: '#AACCEE'
               },
               tip: 'bottomLeft',
               name: 'dark'
            }
    
            var theContent = $(val).html();
            $(val).qtip({
                content: theContent,
                 position: {
                          corner: {
                             target: 'topRight',
                             tooltip: 'bottomLeft'
                          }
                       },
                   style: 'mystyle'
            });
        });
    });
    

    This way, any div with class="tooltip" will automatically have qTip enabled. That’s actually what I did on my project.

    Here’s my test HTML:-

     <div class="controlTitleContainer">
          <div class="text">
               <label for="ModelViewAd_Title">Titel</label>
          </div>
          <div class="icon">
               &nbsp;<span class="tooltip">MyToolTipTest</span>
               &nbsp;<span class="tooltip">MyToolTipTest2</span>
               &nbsp;<span class="tooltip">MyToolTipTest3</span>
          </div>
      </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the qtip2 library which looks like this: $('.selector').qtip({ // options //
$('.selector').qtip({ content: { text: function(api) { return $(this).children('.tip').clone(); } }, style: { classes: 'ui-tooltip-rounded',
i'm using qtip in this way: $('#div').qtip({content:CONTENT,show: {event: false,ready: true},hide:false,position: {at: 'bottom left'}}); My
I'm using jquery.qTip on http://comps.gunnjerkens.com/phws/services/ Looks beautiful with the drop shadow and rounded borders
i have an asp.net mvc site and here is a dynamic tooltip using qTip
I'm using the qTip plugin for jQuery. Using the following function it cycles through
using xmltextreader, how would I load a hashtable. XML: <base><user name=john>2342343</user><user name=mark>239099393</user></base> This was
Its a bit difficult for me to explain this. I am using qtip to
I'm using qtip ( http://craigsworks.com/projects/qtip/ ) to make tooltips. Now I need to show
I am using qTip: http://craigsworks.com/projects/qtip2 and my current problem is that when I hover

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.