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">The Javascript: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. ' ';
echo "</span></div>\n";
} else {
echo '<div style="text-align:right;">' .$i. " </div>\n";
}
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(); ...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>
Thank you for codecall.
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. ' '; 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. " </div>\n"; }
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks