Please Log-in or Register to get full access to the forums.

Post Reply 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding a simple function to "content:" to select desired text
31st May, 19:26 (This post was last modified: 31st May 20:19 by lzw8bk.)
Post: #1
Adding a simple function to "content:" to select desired text
I have qTip running under jQuery fullCalendar and it works fine defining text for content.

What I want to do is display different text in the tip depending on the existence of a calendar event data value and I know these values are available because I display them as standard content in tip:

For instance:
JS Code
eventRender : function(event,element) {
	content : function(element,event){ 
		qtipContent = "Default Text" + event.tipdate;
		if( event.tipdate == undefined ) qtipContent = "Tip date not available";
		return qtipContent; 

The above code returns and displays a blank tip.Huh So, Is there another way of doing this?

Thanks in advance for your guidance.Smile
Take a look at the calendar here:

I found a solution at
and it works!!

Is there an alternative solution? If so, might also post it in Tutorials too.

Otherwise, great forum.

My new code:
JS Code
eventRender : function(event,element){
		content : 'Default text ' + event.tipdate,
			api: {
				beforeShow: function () {
				if( event.tipdate == undefined )
					this.updateContent('Tip date not available',true);
Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  very simple working example? solitario 11 20,015 16th September 19:04
Last Post: franc
  How to call javascript function within Qtip to show and hide div msgmanna 1 2,018 12th August 12:16
Last Post: Craig
  Yet another simple test that won't work t_wysocki 0 1,359 11th August 20:11
Last Post: t_wysocki
  Displaying simple html page tooltip issue usshadowop 0 2,299 23rd May 17:17
Last Post: usshadowop
  [Solved] Hover text and AJAX content gottihh 2 3,224 10th May 07:24
Last Post: gottihh
  [Solved] qtip showing content from db doesn't change when content in db changes. vtoepel 2 2,525 23rd April 16:02
Last Post: vtoepel
  [Solved] qTip Ajax data for text in a div akhil_csit 1 2,466 14th March 19:27
Last Post: Craig
  [Solved] Changing ToolTip Text DaveRich 3 2,445 13th February 17:02
Last Post: Craig
  [solved] Trouble with qtips adding a scrollbar momentarily to window patricia 0 2,151 2nd December 19:40
Last Post: patricia
  [Solved] qTip Script help - need to remove text MConley 3 2,035 14th November 20:57
Last Post: Craig

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