qTip viewport adjustment not working
Asked Answered
D

1

7

I have solved this problem already, but I wanted to share it, as I can see alot of people are dealing with it, and not enough solutions are available.

qTip Viewport adjustments weren't working for me.

Digastric answered 12/8, 2013 at 12:54 Comment(0)
D
18

First problem:

I had forgotten to include the library, when I first downloaded qTip: qTip Download page, remember Viewport Adjustment!

Second problem:
I hadn't setup it up right:
The simplest way of getting this functionality can be seen here:

// Create the tooltips only when document ready
 $(document).ready(function()
 {
     // MAKE SURE YOUR SELECTOR MATCHES SOMETHING IN YOUR HTML!!!
     $('.qtippy').each(function() {
         $(this).qtip({
             position: {
                    my: 'left top',
                    at: 'right center',
                    viewport: $(window)
                },
         });
     });

     $(".qtippy").draggable();
 });

Or play with it in this jsFiddle: http://jsfiddle.net/nM7AA/

Digastric answered 12/8, 2013 at 12:54 Comment(1)
Thanks, this saved me some headaches. Worth noting too that the first line of the qtip .js will include the word viewport if you have that option selected. Should look something like /* qTip2 v2.2.0 tips modal viewport svg imagemap ie6 | qtip2.com | Licensed MIT, GPL | Thu Nov 21 2013 20:34:59 */Vanvanadate

© 2022 - 2024 — McMap. All rights reserved.