Closed Thread
Results 1 to 2 of 2

Thread: Calling Javascript Ghost Busters (jQuery Multiple tooltips for Calendar)

  1. #1
    dvelguru is offline Newbie
    Join Date
    Oct 2009
    Posts
    4
    Rep Power
    0

    Calling Javascript Ghost Busters (jQuery Multiple tooltips for Calendar)

    Hey everyone.

    I've been trying to create multiple tooltips within my $events array. But, I can't figure out how to get it to work. Please help!!

    And the Code that is making this work:
    Code:
    <table width="582" border="0" cellpadding="0" cellspacing="0">
    <tr>
    	<td>
    <!-- the tooltip -->
    <div id="tooltip">
    	<div style="overflow:auto; width:100%; height:120px;">
    		I need the tooltips to go inside my array,
    		however, I don't know how to accomplish this.
    	</div>
    </div>
    		<table id="calendar" width="100%" border="0" cellpadding="0" cellspacing="1">
    			<tr valign="top">
    Code:
    if(isset($events[$i]))
        {
            echo 
    "<div class=\"day\" style=\"width:90; height:100%; text-align:right;\"><span style=\"background-color:#1C1AA6; color:#FFF;\">";
            echo 
    $i'&nbsp;';
            echo 
    "</span></div>\n";
        } else {
            echo 
    '<div style="text-align:right;">' .$i"&nbsp;</div>\n";
        } 
    The Javascript:
    Code:
    <script type="text/javascript">
    
    $(document).ready(function() {
    
    	// initialize tooltip
    	$("#calendar div.day").tooltip({
    
    
    		// use single tooltip element for all tips
    		tip: '#tooltip',
    
    		// tweak the position
    		offset: [10, 2],
    
    		// use "slide" effect
    		effect: 'slide'
    
    	// add dynamic plugin
    	}).dynamic( {
    
    		// customized configuration on bottom edge
    		bottom: {
    
    			// slide downwards
    			direction: 'down',
    
    			// bounce back when closed
    			bounce: true
    		}
    	});
    
    });
    
    </script>
    This is working fine but I want to have tooltips for each day in my $events[ARR]. The programmer for this just says "Just do following $(".trigger").tooltip(); ...

    Thank you for codecall.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    dvelguru is offline Newbie
    Join Date
    Oct 2009
    Posts
    4
    Rep Power
    0

    Re: Calling Javascript Ghost Busters (jQuery Multiple tooltips for Calendar)

    Simple fix was to place the tooltip below the trigger.

    Thanx everyone for reading.

    Code:
    	if(isset($events[$i]))
    	{
    
    		echo "<div class=\"trigger\" style=\"width:90; height:100%; text-align:right;\"><span style=\"background-color:#1C1AA6; color:#FFF;\">";
    		echo $i. '&nbsp;';
    		echo "</span></div>\n";
    		while (list($key, $value) = each ($events[$i])) {
    echo '
    <div class="tooltip">
    	<div style="overflow:auto; width:100%; height:120px;">
    		I need the tooltips to go inside my array,
    		however, I don\'t know how to accomplish this.
    		';
    		echo '<pre>'; var_dump($events[$i]); echo '</pre>';
    echo		'
    	</div>
    </div>
    ';
    		}
    	} else {
    		echo '<div style="text-align:right;">' .$i. "&nbsp;</div>\n";
    	}

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. javascript Calendar
    By Olain in forum Request Services
    Replies: 1
    Last Post: 04-23-2011, 07:57 AM
  2. Javascript Calendar problem
    By Olain in forum JavaScript and CSS
    Replies: 4
    Last Post: 03-08-2011, 11:52 PM
  3. Javascript Calendar problem
    By Olain in forum JavaScript and CSS
    Replies: 0
    Last Post: 03-07-2011, 11:28 PM
  4. Calling multiple functions in a single line
    By fazlerocks in forum C and C++
    Replies: 4
    Last Post: 01-17-2011, 06:03 PM
  5. Replies: 0
    Last Post: 03-19-2010, 08:23 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts