How to set the tip dimensions with jQuery qTIp?
Asked Answered
A

3

6

I'm having some trouble with modifying qTip's tip size (x,y). I tried to add the style: { tip: { x:2,y:2 } } in all sorts of ways, but failed.

How can I add it to the following script?

  // Status Tooltips Style
  $.fn.qtip.styles.statusTooltips = {
    background: '#333333',
    color: 'white',
    textAlign: 'center',
    border: {
      width: 1,
      radius: 5,
      color: '#333333'
    },
    tip: 'leftMiddle',
    name: 'dark'
  }

  // Status Tooltips Init
  $('.status[title]').qtip({
    style: 'statusTooltips',
    position: {
      corner: {
         target: 'rightMiddle',
         tooltip: 'leftBottom'
      }
    }
  });
Annates answered 6/7, 2010 at 7:33 Comment(1)
qTip's documenation on this: craigsworks.com/projects/qtip/docs/reference/#styleAnnates
S
10

it's simpe enough:

$("#mytip").qtip({style: { tip: { size: { x: 10, y: 10}} }});

http://craigsworks.com/projects/qtip/docs/tutorials/#tips

Supporter answered 6/7, 2010 at 7:43 Comment(2)
You must imagine I've tried this before posting my question to the StackOverflow community, yes?Annates
Yes, but since you left out the "size"-object in your question, i thought might have missed that for some reason, stranger things have happened. Sorry if you felt insulted.Supporter
N
4

For qtip 2, you can just set the width and height properties of the tip object:

$("#mytip").qtip({
    style: {
        tip: {
            width: 10,
            height: 10
        }
    }
});

See http://qtip2.com/plugins#tips.width

Nonsuit answered 2/10, 2013 at 15:42 Comment(0)
A
-6

Got it!


  $('.status[title]').qtip({
    style: {background:'#333333',
      color:'white',
      textAlign:'center',
      border:{width: 1, radius: 5, color: '#333333'},
      tip:{corner:'leftMiddle',size: { x:6,y:10 }}
    },
    position: {corner: {target:'rightMiddle',tooltip:'leftBottom'}}
  });

Thanks, StackOverflow, for being an occasional rubber duck :)

Annates answered 6/7, 2010 at 7:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.