Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery tooltip doubts/questions
    text
    copied!<p>I'm developing a last.fm widget, and one of the requisites is, for each track that is displayed of a certain tag (genre), a small button must be present. This is so that a tooltip appears when the button is clicked, showing more information about a certain artist, their albums, and their most popular track. This is all done with Ajax requests.</p> <p>My page is live <a href="http://phpdev.dei.isep.ipp.pt/i101524/lastfm-widget/index.html" rel="nofollow">here</a>. I have managed to get everything working except the tooltip, which I'd like to get showing when someone clicks the little 'i' button icon next to each track. </p> <p>Some questions arise, though:</p> <ol> <li>I will need to fetch the data from last.fm with Ajax for the tooltip and then position the tooltip so that it shifts automatically according to the button that's pressed.</li> </ol> <p>My code that shows the 'i' icon next to each track is just this (positioned relatively with CSS after):</p> <pre><code>&lt;dd class="lfm_info"&gt;&lt;img src="images/info.png" /&gt;&lt;/dd&gt; </code></pre> <p>The Ajax function creates X buttons depending on how many tracks have been selected. However, from what I've been reading, only one tooltip should be created, outside any tags (but inside the <code>&lt;body</code> tag, of course) and this should be shifted programmatically. Is this the correct approach?</p> <p>I've also noticed that there seems to be a huge amount of JQuery plugins to handle tooltips, and I've not managed to get even one to work because of issue 1) - I don't know how to position them, so they show up in random places of my page if I place the tags outside my repeating track <code>&lt;div&gt;</code>'s, and <strong>don't even show up at all</strong> if I place it inside those said tags. Which do you think is the best plugin to handle/create tooltips? I'd like something clean, and that handles automatic positioning easily.</p> <p>Thank you for reading, and I hope someone may be able to assist me.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload