QTip jQuery Plugin Not Always Dismissal

I am using the qTip jquery qTip plugin for the website I am working on, based on another thread that I brought here: stream

My question is: I have a navigation bar at the top of my screen, which basically sets the title attribute based on your tabs menu, they are all stored in a javascript array.

For example, I have three menu options that go to the top of the screen, for example, Menu A, Menu B and Menu C.

I also have an informational image located at the far right of the navigation bar, on which I set the title attribute based on the menu option selected in the navigation bar.

For instance:

Menu A => myRole[0] = "Admin"
Menu B => myRole[1] = "Manager"
Menu C => myRole[2] = "Guest"

Thus, basically, when the user clicks on each of the menus in the navigation bar, I set the title attribute in the information image as “Administrator”, “Manager” or “Guest”.

At startup, the qTip plugin works and displays "Admin" when I hover over it, but when I change the menu to Menu C, it still displays "Admin" instead of "Guest"

In appearance, it doesn't seem to call the qTip plugin, which I placed on the screen footer (see the actual code below).

Any ideas on how qTip fires every time I click / change menu options and pickup value in javascript array?

<script type="text/javascript" src="jquery.qtip-1.0.0-rc3.min.js"></script>



<script type="text/javascript"> 
$(document).ready(function()
{
   $('div#infoi img[title]').qtip({
      position: { 
         adjust: { x:-110, y:0 },
         corner: {
            target: 'bottomLeft',
            tooltip: 'topMiddle'
         }
      },
      style: {
        width: 250,
        padding: 5,
        background: '#E7F1FA',
        color: 'black',
        textAlign: 'center',
        border: {
          width: 3,
          color: '#65a9d7'
        },
        tip: 'topRight'
      }
   });
});
</script>

Thank.

0
source share
1 answer

, , .

, . , qtip, ,    

var qtipset = function(){
      $('div#infoi img[title]').qtip({
      position: { 
         adjust: { x:-110, y:0 },
         corner: {
            target: 'bottomLeft',
            tooltip: 'topMiddle'
         }
      },
      style: {
        width: 250,
        padding: 5,
        background: '#E7F1FA',
        color: 'black',
        textAlign: 'center',
        border: {
          width: 3,
          color: '#65a9d7'
        },
        tip: 'topRight'
      }
   });
     }

Javascript, title , , qtipset(); qtip , , , qtip .

0

Source: https://habr.com/ru/post/1748331/


All Articles