Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] [Solved] Dynamically show qTip
7th December, 16:33
Post: #1
[Solved] [Solved] Dynamically show qTip
Hello
first of all great work, keep it up this way.

wanted to check if the following scenario is feasible:

i have a page with hundreds of tooltips that are enabled of course on mouse over . on mouse over an ajax request is made to another page which brings up a photo and a pic.

JS Code
$('#scroll a.active').each(function(){
      // We make use of the .each() loop to gain access to each element via the "this" keyword...
      $(this).qtip({
           prerender: true,
         content: {
            // Set the text to an image HTML string with the correct src URL to the loading image you want to use
            text: '<img class="throbber" src="/_img/wait.gif" alt="Loading..." />',
            ajax: {
               url: $(this).attr('rel') // Use the rel attribute of each element for the url to load
            },
            title: {
               text: $(this).attr('title') , // Give the tooltip a title using each elements text
               button: true
            }
         },
         position: {
            at: 'bottom center', // Position the tooltip above the link
            my: 'top center',
            viewport: $(window), // Keep the tooltip on-screen at all times
            effect: false // Disable positioning animation
         },
         show: {
            event: 'mouseover',
            solo: true // Only show one tooltip at a time
         },
         hide: 'unfocus',
         style: {
            classes: 'ui-tooltip-wiki ui-tooltip-light ui-tooltip-shadow'
         }
      });




what i wanted to do is to somehow show one by one tooltip dynamically without the user doing mouse over[/code]

for example :
JS Code
$('a.active').each(function() {
   showQtip();//example of a function of mine
});


the effect im trying to achieve is to have tooltips show dynamically one after the other with some delay without user intervention, thus watching the page and having tooltips show and hide one after the other. do you think thats possible ?
also without messing up with the user mouse over function when he wishes too.

i know its far fetched, just thought to ask in case anybody has any idea about it.
Find all posts by this user
Quote this message in a reply
8th December, 00:51
Post: #2
RE: Dynamically show qTip
JS Code
$('a.active').each(function() {
   $(this).qtip('show'); // Show it
});

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
8th December, 06:37
Post: #3
RE: [Solved] Dynamically show qTip
you are the greatest. it was that simple ha?

maybe some tip in the docs about it, to be more clear?
thanks again, didnt not expect an answer so soon.
Find all posts by this user
Quote this message in a reply
8th December, 18:31
Post: #4
RE: [Solved] [Solved] Dynamically show qTip
http://craigsworks.com/projects/qtip2/docs/api/#show Wink

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
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Solved] show the qTip when {if} is true jaybekster 3 202 16th April 13:27
Last Post: jaybekster
  [Solved] show a tooltip on mouse location via a jquery function BigZ 1 187 28th March 13:06
Last Post: Craig
  [Solved] Best option for Dynamically Generated Content jmillspaysbills 11 1,096 16th January 22:44
Last Post: jmillspaysbills
  [Solved] always show qtip in bottom left of screen myapweb 2 643 9th January 21:59
Last Post: jmillspaysbills
  [Solved] Dynamically disable/enable tips on the same trigger without refreshing page dvieira 1 711 27th October 18:01
Last Post: Craig



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