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) {
element.qtip({
	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: http://dev.riverchurchbishop.com/calendar/

I found a solution at
http://craigsworks.com/projects/forums/t...-variables
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){
	element.qtip({
		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
  How to call javascript function within Qtip to show and hide div msgmanna 1 1,235 12th August 12:16
Last Post: Craig
  Yet another simple test that won't work t_wysocki 0 916 11th August 20:11
Last Post: t_wysocki
  very simple working example? solitario 7 14,805 3rd June 23:41
Last Post: Zardiw
  Displaying simple html page tooltip issue usshadowop 0 1,718 23rd May 17:17
Last Post: usshadowop
  [Solved] Hover text and AJAX content gottihh 2 2,279 10th May 07:24
Last Post: gottihh
  [Solved] qtip showing content from db doesn't change when content in db changes. vtoepel 2 1,915 23rd April 16:02
Last Post: vtoepel
  [Solved] qTip Ajax data for text in a div akhil_csit 1 1,856 14th March 19:27
Last Post: Craig
  [Solved] Changing ToolTip Text DaveRich 3 1,823 13th February 17:02
Last Post: Craig
  [solved] Trouble with qtips adding a scrollbar momentarily to window patricia 0 1,660 2nd December 19:40
Last Post: patricia
  [Solved] qTip Script help - need to remove text MConley 3 1,582 14th November 20:57
Last Post: Craig



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