Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edge Detection with qTip2

I'm using qTip2. I thought it included screen detection - however, I am using the tooltip within an iframe, and it isn't working:

screenshot showing tooltip hidden under edge of iframe

I tried:

position: {
    adjust: {screen: true},
    my: 'bottom center',  // Position my top left...
    at: 'top center' // at the bottom right of...
},

It didn't work

like image 238
Jason Avatar asked May 27 '26 17:05

Jason


1 Answers

The qTip2 plugin has a viewport option:

position: {
    my: 'bottom center',  // Position my top left...
    at: 'top center', // at the bottom right of...
    adjust: {
        screen: true
    },
    viewport: $(window)
},

It fixes this scenario.

like image 53
Jason Avatar answered May 30 '26 07:05

Jason



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!