Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic content loaded on mouseover
17th April, 12:43 (This post was last modified: 17th April 12:43 by kslat3r.)
Post: #1
Dynamic content loaded on mouseover
Hey
I just made this very simple use of qtip that might be handy. Smile
I have a list genereted in a php script, every item of the list has an ID, like that :

JS Code
<tr><td class="formation_titre">
   <a id="S-SECU" ...
</td></tr>
<tr><td class="formation_titre">
   <a id="S-OTHER" ...
</td></tr>


I wanted to load some content dynamicaly from this ID using Qtip.
I did so :

JS Code
tab_formations = $('td.formation_titre a');
for(var i=0; i < tab_formations.length; i++) {
   var pof = tab_formations[i];
   var code = pof['id'];
   $(pof).qtip({
      content: { url: 'planning_detail.php5', data: { id: code}, method: 'get' },
      style: { 
         width: 260,
         padding: 2,
         background: '#f2f19c',
         color: 'black',
         textAlign: 'center',
         border: {
            width: 0,
            radius: 5,
            color: '#d4d37e'
         }
      }
   });
}


The whole styling of the tooltip content is ensured by the containing CSS from the mother page.
It works just fine, and it's fast and doesn't load any content at all when not needed !

http://www.oxiane.com

Cheers
Alain
Find all posts by this user
Quote this message in a reply
22nd August, 02:42
Post: #2
Dynamic content loaded on mouseover
I'm using this script to retrieve info from a database, problem is this script can't recognize the individual Id's of the various mouse overs. Any ideas?
Find all posts by this user
Quote this message in a reply
22nd August, 13:39
Post: #3
Dynamic content loaded on mouseover
pre, could you provide the code your using so I can take a look? Sounds like you simply need to use an each() loop.

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
15th September, 15:09
Post: #4
Dynamic content loaded on mouseover
pre Wrote:I'm using this script to retrieve info from a database, problem is this script can't recognize the individual Id's of the various mouse overs. Any ideas?

I just started to look at qTip. I also have a database with the content already inserted but I am not sure where to start to retrieve it. Can you provide an example? Did you resolve the issue you asked about?
Thanks,
Neil
Find all posts by this user
Quote this message in a reply
26th September, 17:09
Post: #5
Dynamic content loaded on mouseover
neilgould Wrote:
pre Wrote:I'm using this script to retrieve info from a database, problem is this script can't recognize the individual Id's of the various mouse overs. Any ideas?

I just started to look at qTip. I also have a database with the content already inserted but I am not sure where to start to retrieve it. Can you provide an example? Did you resolve the issue you asked about?
Thanks,
Neil

Yeah I did, using a loop and setting the rel to <span id=content><a href='#' rel='demopage.php?memid=<?php echo $memid ?>

That works in registering the individual id's of the content in the database.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Dynamic content from page variables kenswdev 0 418 9th February 18:06
Last Post: kenswdev
  Dynamic Content on first show, not page load TheOverbob 6 6,950 2nd August 13:01
Last Post: Craig
  [Solved] Displaying tooltip on page load/mouseover otherwise burghars 1 1,357 18th July 11:55
Last Post: Craig
  Tutorial: Dynamic content on first load using ajax Abrasive 0 4,825 28th June 05:44
Last Post: Abrasive



User(s) browsing this thread: 1 Guest(s)