1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 html in tooltips?

Discussion in 'Styling and Customization Questions' started by Stuart Wright, Jul 6, 2016.

  1. Stuart Wright

    Stuart Wright Well-Known Member

    Hello folks, is there a way to customise tooltips so they contain css styled text like this?

    upload_2016-7-6_11-38-1.png
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    "Sort of".

    It would pretty much require a small amount of custom development.

    If you consider something like the thread preview tooltip, you could actually use that framework for this. Hovering over the element has to make an AJAX request to a specified URL which will then return a template which contains the contents you want to display inside the tooltip.
     
    Stuart Wright likes this.
  3. Stuart Wright

    Stuart Wright Well-Known Member

    The thing about the thread preview tooltip is that there is a slight delay. We need the popup to pop up instantly.
    Is there a way to remove the delay?
     
    Last edited: Jul 6, 2016
  4. Chris D

    Chris D XenForo Developer Staff Member

    Not really. Part of the delay is the loading of the Ajax request. The othe part is as designed so it doesn't get triggered automatically by accident. I don't think it's configurable.
     
  5. Stuart Wright

    Stuart Wright Well-Known Member

    Then we will have to use a different script :(
     
  6. Mike

    Mike XenForo Developer Staff Member

    Our tooltip system is based on the title attribute, but the node descriptions use as separate element. No ajax involved. However, the JS is somewhat specific to that usage, mostly with respect to positioning.

    You can use the underlying tooltip library directly though. Here's an example: http://jquerytools.github.io/demos/tooltip/any-html.html
     
  7. Stuart Wright

    Stuart Wright Well-Known Member

    Thanks both :)
     

Share This Page