Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4324592
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:09:11+00:00 2026-05-21T09:09:11+00:00

I’m developing a complicated page containing some widgets, some ‘draggable’ elements and a <canvas>

  • 0

I’m developing a complicated page containing some widgets, some ‘draggable’ elements and a <canvas> interactive timeline.


Problem:

On mouseover – on elements that can be dragged (entities) -, I have to display a tooltip containing some advanced info (a ‘preview’ of an entity page) about that particular element.

The draggable items (I think they are ~ 100) are represented in this way (some of them are created dinamically):

<!-- ... -->
<div id="entity-1" class="draggable">
    <div class="title">title</div>
    <img src="#URL" alt="..." />
    <div class="tooltip-wrapper"></div>
</div>
<div id="entity-2" class="draggable">
    <div class="title">title</div>
    <img src="#URL" alt="..." />
    <div class="tooltip-wrapper"></div>
</div>
<div id="entity-3" class="draggable">
    <div class="title">title</div>
    <img src="#URL" alt="..." />
    <div class="tooltip-wrapper"></div>
</div>
<!-- ... -->

where .tooltip-wrapper is initially set to display:none and opacity:0

A general tooltip is a kinda complicated HTML containing some details i.e. (lot simplified)

<div class="tooltip-entity-wrapper">
    <div class="title">entity title</div>

    <div class="tab"><!-- tab content --></div>
    <div class="tab"><!-- tab content --></div>
    <div class="tab"><!-- tab content --></div>

    <form action="...">
        <!-- form content -->
    </form>
    <a href="#URL"><!-- full entity page link --></a>
</div>

I’m thinking about 3 possible solutions:

  • On mouseover, (on first one) make an ajax request that returns the particular tooltip HTML, inject it inside the tooltip-wrapper, show it and on mouseout hide it.
  • On mouseover, (on first one) make an ajax request that returns a json, render it by js (mustache), inject it inside the tooltip-wrapper, show it and on mouseout hide it.
  • Render the tooltip directly inside an element, and toggle it on mouseover/mouseout

The css/layout/positioning is not a big problem, also because I’ve already created a tooltip mootools plugin mockup (if u have any suggestion about some great customizable mootools tooltip plugins, please let me know 🙂 ).

I just need a tip/suggestion on which way to follow to implement this advanced ‘tooltip’ system or if you have better solutions to suggest me. 🙂

Thanks everyone


p.s. I’m developing the web app using rails3 (and haml, scss, compass) and mootools as js framework (+ mustache as templating system).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T09:09:12+00:00Added an answer on May 21, 2026 at 9:09 am

    you can’t really take one method and pick it over the other w/o covering some of your business requirements first.

    the questions you need to ask yourself are:


    is SEO important

    if yes:

    • important NOT to have the content in the body as it’s not relevant or unique, may affect your keyword density and give the wrong impression about the real content of the page to google, then AJAX
    • important TO have in the body for google to see, then render in a hidden element

    I have a feeling your app won’t require much of that but it’s a valid point.


    DOM and “is performance important”

    if yes (you already use canvas… 100+ draggables…)

    • how many (is too many?) nodes are you going to have that have tooltips (extra dom nodes)? too many? go with ajax / event delegation
    • few tooltips per page: can still pre-render it to save the extra request(s)
    • footprint of adding all the tip events, delegate!
    • delay while waiting for XHR onComplete undesirable? pre-render!

    Network / requests

    if you go the ajax route, you need to figure a way to minimize the number of requests possible, especially if the same tooltips can be triggered again and again. this means:

    • caching request results locally on page and checking against cache first before requesting it from the server
    • if your data is not dynamic / real time, consider even pushing to localStorage under some key / db id, this will survive page reload, transition and return visitors.

    as for the how-to, I know you are perfectly capable of doing the actual code so good luck 🙂

    from my experience, I do a mix of both. stock information that changes often but not that often is cached per page load. usage/sizing info, form helpers etc that don’t change i cache in localStorage instead. tooltips that have an obvious SEO value are in the body.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm making a simple page using Google Maps API 3. My first. One marker
I have some data like this: 1 2 3 4 5 9 2 6
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.