Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call other functions from within the tooltip
12th August, 22:29
Post: #1
Call other functions from within the tooltip
I am appending a "previous", and a "next" link to the bottom of each of my tooltips, so people can move through them in order or in reverse. I've written some functions to be called when the links are clicked, but for some reason, the functions I attached to the links don't seem to be firing when clicked. I even tested it with a simple jQuery function such as this:

JS Code
$('a').click(function(){
			alert('hi');
		});


and the other anchor tags respond, but the links inside the tooltip, don't trigger the alert. I've searched the forums and haven't found any information about why my links won't work from inside the tooltip. Thanks in advance to anyone who can shed light on this?
Find all posts by this user
Quote this message in a reply
13th August, 12:19
Post: #2
RE: Call other functions from within the tooltip
Hoopdloop, just checking but you are using qTip2 correct? Regarding the issue, it sounds like you need to apply the event handlers after the tooltips have been rendered, e.g. using the events.render callback:

JS Code
$('.selector').qtip({
   events: {
      render: function() {
         // do stuff
      }
   }
})

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
13th August, 15:34
Post: #3
RE: Call other functions from within the tooltip
(13th August 12:19)Craig Wrote:  Hoopdloop, just checking but you are using qTip2 correct?

Craig,
Actually I've been playing with qtip 1 and put it in various events such as onRender, onContentLoaded, etc... with no luck. I'll convert to 2, then try your suggestion, and let you know how it goes. Thanks.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Position of qTip Modal from call within a tooltip chuuke 1 259 17th January 21:54
Last Post: Craig
  ajax call with dataTable lib hanabadler 0 666 23rd September 03:42
Last Post: hanabadler
  [Solved] How to call javascript function within Qtip? When2Meets2 7 1,099 19th September 16:49
Last Post: Craig
  Ajax call not being made from qtip sz3y1w 1 882 7th September 19:55
Last Post: Craig
  Auto width with Ajax Call sisilone 1 1,526 2nd September 12:34
Last Post: Craig
  [Solved] call qtip from a qtip netzton 4 806 28th August 21:20
Last Post: Craig
  [Solved] AJAX call: use different dataFilter than $.ajaxSetup? ItzMeJoey 3 2,175 6th July 17:53
Last Post: ItzMeJoey
  Add Title to Content with an Ajax Call brant 2 1,222 15th April 16:24
Last Post: Craig
  [Solved] using the updateStyle API call rmckillen 2 896 5th April 17:14
Last Post: rmckillen
  Call javascript function within Qtip? Meista 1 2,302 1st April 14:06
Last Post: sveiki



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