Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the tip dimensions with jQuery qTIp?

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'
      }
    }
  });
like image 920
Tomer Lichtash Avatar asked Jul 06 '10 07:07

Tomer Lichtash


2 Answers

it's simpe enough:

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

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

like image 72
Nils Avatar answered Sep 18 '22 01:09

Nils


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

like image 40
nullability Avatar answered Sep 20 '22 01:09

nullability