Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Update content dynamically with QTip and jQuery
27th July, 12:44
Post: #1
Update content dynamically with QTip and jQuery
Hi,

I have a initial JSP page which sports some boxes(seperate div elements), on mouseover of this boxes I am showing a tooltip. The content of this tooltip is another JSP page(same for all boxes but different data).

How can I load fresh content every time mouseover happens?

Also in the below code :
$("jqueryselector").qtip({
content: {
url: 'localcontent.html',
data: { id: 5 },
method: 'get'
}
});

How can I get data in the url page, if it is a JSP with few functions?

Thanks,
Dhanya
Find all posts by this user
Quote this message in a reply
28th July, 21:07
Post: #2
RE: Update content dynamically with QTip and jQuery
dhanya, try using the onShow callback to get the data instead:

JS Code
$('.selector').qtip({
   api: {
      onShow: function() {
         this.elements.content.post('url', data);
      }
   }
})

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
24th November, 10:05
Post: #3
RE: Update content dynamically with QTip and jQuery
This above example is not working for me Sad .... I get a Firebug warning of "this.elements.content.post is not a function" - any ideas?
Find all posts by this user
Quote this message in a reply
24th November, 17:05
Post: #4
RE: Update content dynamically with QTip and jQuery
Might need to surround the content elem in a $()

JS Code
$('.selector').qtip({
   api: {
      onShow: function() {
         $(this.elements.content).post('url', data);
      }
   }
})

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] Need some help:codes in Jquery BabyShung 1 65 29th January 16:35
Last Post: Craig
  Tooltips not loading jQuery or other js files from parent document crodesign 2 144 13th January 22:19
Last Post: crodesign
  qtip with jquery mobile tap event finedesignz 1 180 4th January 21:18
Last Post: Craig
  [Solved] QTip content from existing div element on page? dcash 4 1,868 8th December 18:29
Last Post: Craig
  qtip inside the jquery UI Dialog tiggi 1 493 20th October 18:49
Last Post: Craig
  Google Calendar like bubble for Jquery FullCalendar tdmohr 13 10,211 18th October 07:22
Last Post: jokepondy
  [Solved] Is there an easier way to show/hide tooltips dynamically? gloosemo 1 399 17th October 15:58
Last Post: Craig
  Cannot make jquery plugin or qtip plugin work anindasen 3 707 8th October 13:49
Last Post: Craig
  How to update the length of a Qtip? sli 0 574 21st July 17:39
Last Post: sli
  [Solved] Can't dynamically update content text! hoodedperson70 9 1,014 20th July 18:47
Last Post: hoodedperson70



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