开发者

How to set the tip dimensions with jQuery qTIp?

开发者 https://www.devze.com 2023-01-06 00:51 出处:网络
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.

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.s开发者_如何学运维tatusTooltips = {
    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'
      }
    }
  });


it's simpe enough:

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

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


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


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 :)

0

精彩评论

暂无评论...
验证码 换一张
取 消