SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    wTooltip showing briefly after some few uses

    Hello,

    I have some wTooltip at the page:

    http://aupresent.thalasoft.com/elearning/exercise/339

    and after showing some of them, they stopped functioning properly and appear only very briefly.

    I wonder what could be the cause for it, Firebug didn't show me any thing wrong.

    If you have any idea..

    Thanks !

    Stephane

  2. #2
    SitePoint Zealot
    Join Date
    Aug 2010
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I added a delay of 200 as in:

    Code:
      $(".$tooltipClassName").wTooltip({
        follow: false,
        fadeIn: 300,
        fadeOut: 500,
        delay: 200,
        content: true,
        callBefore: function(tooltip, node, settings) {
          $.ajax({
            url: "$gLexiconUrl/get_lexicon_entry.php?lexiconEntryId="+$(node).attr("lexicon_entry_id"),
            async: false,
            context: document.body,
            success: function(data){
              $(tooltip).html(data);
            }
          });
    
          // Warn about any missing entry from the lexicon
          var retrievedContent = $(tooltip).html();
          if (retrievedContent.length == 0) {
            var pageUrl = encodeURIComponent("$gHomeUrl$REQUEST_URI");
            var url = '$gLexiconUrl/missing_lexicon_entry.php?lexiconEntryId="+$(node).attr("lexicon_entry_id")+"&pageUrl='+pageUrl;
            ajaxAsynchronousRequest(url, doNothing);
          }
        },
        style: {
          width: "500px", // Required to avoid the tooltip being displayed off the right
          background: "#ffffff",
          color: "#000"
        }
      });
    
      function doNothing() {
      }
    And this solved the issue, there is no more of this unstable display.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •