خرید بک لینک
I create controls with unique IDs. I then create and hide sparkline images with unique IDs. The parts of the unique IDs for the paired controls and sparklines match after the 1st character. I then show the appropriate sparklines when the user mousesover a particular control. I do this by passing the unique part of the ID to a function and constructing the control and sparkline IDs. These sparkline images are hidden in another part of the UI to avoid distorting the display. I would like to reposition the appropriate sparklines next to the control being hovered over. The hiding and showing works, but the repositioning does not. What I've come up with follows. Any help is appreciated.

Code:

function showIt2(itx) { // Show ID.
              var slID = 'x' + itx;
              var imgID = 'z' + itx;
              var rect = document.getElementById(imgID).getBoundingClientRect();
              var Yx = Math.floor(rect.top) - 5;
              var Xx = Math.floor(rect.left) + 30;

              document.getElementById(slID).position = 'absolute';
              document.getElementById(slID).style.top = Yx;
              document.getElementById(slID).style.left = Xx;             
             
              var cmdx = 'document.all.' + slID + ".style.visibility='visible';";
              eval(cmdx);
            }

برچسب: نویسنده: آیلین رضوانی تاريخ: جمعه 24 آذر 1396 ساعت: 7:56

صفحه بندی