Home › Forums › Classic DFFS › Tooltip Position Issue
- This topic has 7 replies, 3 voices, and was last updated 8 years, 7 months ago by Jeffery McElroy.
-
AuthorPosts
-
-
October 3, 2014 at 17:55 #6316
What controls the position of the Tooltip in v4? I have an issue but it may be related to the master page. I have disabled modal for forms on a list. Tooltip positioning works fine until I scroll down. The more I scroll down on the page the worse the positioning gets for the tooltips. After I scroll down about 400 pixels the tooltips are lower than the viewable area. Any ideas? If I knew what controlled it I might be able to add some custom css to account for it.
-
October 3, 2014 at 18:29 #6317
Hi,
The scrolltop is calculated from s4-workspace. If this is not in the page scrolling will throw the tooltip out of position.You can override the function by adding this to the bottom of the DFFS_frontend_CEWP.js.aspx file – below DFFS_frontend.js:
<script type="text/javascript"> spjs.dffs.showTooltip = function(elm){ var id = $(elm).attr('fin'), p = $(elm).position(), s = $(window).scrollTop(); if($("#s4-workspace").length > 0){ s = $("#s4-workspace").scrollTop(); } p.top += s; $("#tooltipHolder").html('').attr("pin","0").css({"position":"absolute","left":p.left+25,"top":p.top+15}); if(spjs.dffs.fields[id]!==undefined){ $("#tooltipHolder").appendTo($(elm).parent()); $("#tooltipHolder").html("<div style='padding:3px;'>"+spjs.dffs.data.tooltipObj[id]+"</div>").css({"position":"absolute"}).stop(true,true).fadeIn(200); } } </script>
Alexander
-
October 3, 2014 at 18:38 #6318
Thank you for the quick reply. I added the function but I am getting the same result.
-
October 3, 2014 at 18:52 #6319
I changed the below and it is now working. Thank you!
if($(“#s4-workspace”).length > 0
to
if($(“#s4-workspace”).length < 0-
October 6, 2014 at 23:18 #6325
I’m glad you figured it out. The code I posted was the original one and you have to adjust it to fit your setup.
Alexander
-
October 6, 2014 at 23:50 #6327
Is there something I can do to adjust the onclick? I got the hover working but the onclick still has the same positioning issue. Will these be addressed in your upcoming release? Thank you as always!
-
October 7, 2014 at 03:08 #6328
I got this one working. I beutified the frontend js and was able to figure out a clickToolTip function to add to the front end aspx like the one you gave me for hover. Thank you.
-
-
April 15, 2016 at 18:00 #11140
I am working in SP 2013 and am having this same issue, but when I add the above script to the DFFS_Frontend_CEWP.html file below the DFFS_Frontend_min.js script, the tooltip does not appear on hover or on click. I tried changing “if($(“#s4-workspace”).length < 0” and still same result. Any help is appreciated.
-
-
AuthorPosts
- You must be logged in to reply to this topic.