2 Replies Latest reply: Jan 22, 2014 12:08 AM by Elena_Iv RSS

    jQuery tooltip stops working after dynamic action region refresh

    Elena_Iv

      Hi guys,

       

      Required:  The report should be refreshed every minute, should have a pagination which doesn't reloads the page and a tooltip displayed on mouseEnter event on the value of the report

       

      My solution: I'm using Oracle Timer Plug-in and pagination which both don't submit page but just refresh the region. I also have a jQuery function in a page header that creates tooltips.

       

      The problem:  After the first refresh (or changing a page) my tooltip isn't displayed anymore on that region.

       

      This is the jQuery code:

       

      <script>
      function detailedStatusListToolTip() {
          this.xOffset = 0; // x distance from mouse
          this.yOffset = 10; // y distance from mouse
          jQuery(".image").hover(
              function(e) {
                  var insideText = jQuery(".detailedListTooltip",this).html();
                  this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);
                  $('body').append('<div id="detailedStatusListToolTip">' + insideText + '</div>' );
      
          $('div#detailedStatusListToolTip').css("top", this.top+"px").css("left", this.left+"px").delay(500).fadeIn("fast");
              },
              function() {
              jQuery("div#detailedStatusListToolTip").fadeOut("false").remove();
              }
          ).mousemove(
              function(e) {
              this.top = (e.pageY + yOffset);
              this.left = (e.pageX + xOffset);
              jQuery("div#detailedStatusListToolTip").css("top", this.top+"px").css("left", this.left+"px");
              }
          );
      }
      </script>
      

       

      I call the function on the page load: detailedStatusListToolTip();

       

      I'm using APEX 4.2.2, IE 8

       

      Thanks forward for your help!

       

      Elena

       

      Message was edited by: Elena_Iv