Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calling qtip from an ajax request
29th November, 13:47
Post: #1
Calling qtip from an ajax request
Hiya,

I'm trying to load my pages dynamically using ajax, but obviously when this happens QTIP breaks. I've put together a little call in the AJAX script to call on qtip but I can't get it working. Can anyone help?

Thanks, H

SCript 1 - AJAX loader

JS Code
if(myHttpRequest.readyState==4)
            data.innerHTML = myHttpRequest.responseText;
                                qtip_me('.div_to_act_on');
  }


Script 2 - main JQuery script

JS Code
$(document).ready(function() {
 
    function qtip_me(a) {
        $(a).each(function() {
           $(this).qtip({ 
                   content: {'showme'},
                        position: {corner: {tooltip: 'bottomLeft', target: 'topRight'}},
                        style: { 
                                  width: 300,
                                  padding: 5,
                                  background: '#A2D959',
                                  color: 'black',
                                  textAlign: 'center',
                                  border: {
                                         width: 7,
                                         radius: 5,
                                         color: '#A2D959'
                                  },
                                  tip: 'bottomLeft',
                                  name: 'dark' // Inherit the rest of the attributes from the preset dark style
                        }                       
                }); 
        });
    };
});
Find all posts by this user
Quote this message in a reply
30th November, 01:26
Post: #2
Calling qtip from an ajax request
hfidgen, have you thought about using qTip's built in URL option instead? It can load remote content just like you're doing manually simply by supplying it with the URL of the content you wish to load.

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
  Qtip data not find when using ajax pagereload reinier1991 1 74 10th May 07:52
Last Post: reinier1991
  [Solved] qTip Ajax data for text in a div akhil_csit 1 306 14th March 19:27
Last Post: Craig
  calling .html using the element id matthearn 0 298 24th February 15:08
Last Post: matthearn
  [Solved] creating a qtip with ajax contents based on computed uri params punk.kish 1 398 25th January 15:50
Last Post: Craig
  [Solved] ajax data request on hover settoloki 0 473 30th November 08:42
Last Post: settoloki
  Ajax call not being made from qtip sz3y1w 1 882 7th September 19:55
Last Post: Craig
  [Solved] How to make qTip work with AJAX and a "enable/disable" checkbox? xzuttz 4 1,041 24th August 19:04
Last Post: Craig
  [Solved] About dynamic cpntent in qTip with AJAX. i.am.not.korr 10 2,015 26th April 03:46
Last Post: i.am.not.korr
  dynamically load clock using ajax in qtip ramzyo5 3 1,497 9th February 16:54
Last Post: Craig
  qTip, AJAX and .NET miketravis 19 5,582 21st January 20:45
Last Post: dotNETMkv



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