How to set tip sizes using jQuery qTIp?

I'm having trouble resizing the qTip (x, y) tooltip. I tried to add in style: { tip: { x:2,y:2 } }all ways, but could not.

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'
      }
    }
  });
+5
source share
3 answers

simple enough:

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

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

+9
source

For qtip 2, you can simply set the properties widthand the heightobject tip:

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

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

+4
source

!

  $('.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 the random rubber duck :)

-6
source

All Articles