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 12 28,014 29th October 06:53
Last Post: NikosLed
  [Solved] $ is not a function drtanz 6 8,082 27th October 08:21
Last Post: NikosLed
  How to call javascript function within Qtip to show and hide div msgmanna 1 3,798 12th August 12:16
Last Post: Craig
  Yet another simple test that won't work t_wysocki 0 2,409 11th August 20:11
Last Post: t_wysocki
  Displaying simple html page tooltip issue usshadowop 0 3,203 23rd May 17:17
Last Post: usshadowop
  [Solved] Hover text and AJAX content gottihh 2 4,462 10th May 07:24
Last Post: gottihh
  [Solved] qtip showing content from db doesn't change when content in db changes. vtoepel 2 3,817 23rd April 16:02
Last Post: vtoepel
  [Solved] qTip Ajax data for text in a div akhil_csit 1 3,631 14th March 19:27
Last Post: Craig
  [Solved] Changing ToolTip Text DaveRich 3 4,054 13th February 17:02
Last Post: Craig
  [solved] Trouble with qtips adding a scrollbar momentarily to window patricia 0 2,974 2nd December 19:40
Last Post: patricia

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