Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
destroy cached qTip
7th September, 21:00
Post: #1
destroy cached qTip
Hello I am wondering how to destroy and cached qTip so that it loads fresh every time. I am using "onRender" to make an AJAX call and build up a Div tag. Then I am using self.updateContent to update the content of qTip.

However what I want is for each time the qTip is hovered over (default behavior) that the onRender event of the qTip to be called and spin up a new qTip with fresh contents. Is this possible?

Thanks.
Find all posts by this user
Quote this message in a reply
8th September, 14:58
Post: #2
destroy cached qTip
ajcool123, with the RC3 release there isn't anyway to refresh tooltip content on each successive show event. But... the new branch release has support for a content.url.once option:

JS Code
$('.selector').qtip({ 
   content: { 
      url: { 
         path: 'test.php',
         data: { id: 1 },
         once: false
      }
   }
});


You'll also notice that the data and method options have moved into sub-options of the URL object, and it now supports adding $.ajax properties to the object. This means you can easily apply your own custom error and success handlers, as well as content types right in the qTip options like so:

JS Code
$('.selector').qtip({ 
   content: { 
      url: { 
         path: 'test.php',
         data: { id: 1 },
         once: false,
         success: function(){ alert('I\'m fired along with the default success method'); },
         contentType: 'text/x-json' // I'm retrieving JSON data here instead
      }
   }
});

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
9th September, 18:32
Post: #3
destroy cached qTip
Ok thanks for the link for the latest branch. How do I then use that in my project? I see a bunch of different JS files, which one do I need or do i need to some how combine them? Sorry just not familiar with this.

Can't wait to try out the latest branch, Thanks!
Find all posts by this user
Quote this message in a reply
10th September, 00:16
Post: #4
destroy cached qTip
You'll first need the jquery.qtip.js file, then you can also add the styles and border/tip files if you need those functions. That functions they provide are in the name so if you don't recognise one you probably don't need 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
10th September, 02:03
Post: #5
destroy cached qTip
Thanks for your help I am now using the most recent source. One question I had for you thought, is there a way to get a collection/list of all visible tool tips and hide them? I am dynamically creating tool tips that I destroy when the user clicks the "X" on the title bar, which then allows for the qTip to be recreated on button click.

However I cannot figure out how to hide all visible qTips. Seems like this would be an API call or something, but there has to be a good way to acomplish this. Thanks for all your help!
Find all posts by this user
Quote this message in a reply
10th September, 12:21
Post: #6
destroy cached qTip
ajcool123, the new revision makes this a piece of cake using the API:

JS Code
var interfaces = $.fn.qtip.interfaces;
var i = interfaces.length; while(i--) interfaces[i].hide();

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] Blanket Destroy not working migdalskiy 2 379 22nd August 22:44
Last Post: migdalskiy
  [Solved] Destroy Not Working? bobcarver 1 1,043 22nd May 22:38
Last Post: bobcarver
  [Solved] How to destroy a qtip when the original element is removed molicule 2 1,351 12th April 16:19
Last Post: detj
  [Solved] Error after destroy qtip ngocluu 5 2,464 30th November 17:30
Last Post: evancooperman
  How to destroy cached qtip and then recreate it android 1 1,256 28th July 20:40
Last Post: Craig
  [Solved] [Solved] hide qtip or destroy it abdigadiga 7 3,579 8th May 00:10
Last Post: ikindred
  [Solved] Destroy and error message ('api.options'is null or not an object.) Hagge 4 2,734 31st March 02:03
Last Post: foobar
  qtip("destroy") problem with jquery 1.3.2 nevermore 3 3,982 11th March 23:12
Last Post: Craig
  can't destroy tooltip and ending up with 2 tooltips on one div kurtmarr 4 1,371 3rd March 01:01
Last Post: kurtmarr
  How to dynamically destroy tooltips? fchristant 0 620 28th February 14:27
Last Post: fchristant



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