I was trying to follow instruction from this http://flowplayer.org/tools/demos/tooltip/dynamic.html
but it's frustating... i couldn't do... two days working and nothing.
Well, i will try to describe step by step what i want e what i did:
I have a custom menu, generated by this at function.php, sure:
(don't care about the links, it's only for testing purposes)
//custom menu
function childtheme_menu() {
?>
<div id="menu">
<ul class="sf-menu">
<li class="<?php if (is_front_page) { ?>
current_page_item<?php
}
else {?>
page_item<?php
}?>
"><a>" title="Homepage">Home</a>
<li class="<?php if (is_page('about')) { ?>
current_page_item<?php
}
else {?>
page_item<?php
}?>
"><a>/about/" title="About This Blog">About Us</a>
<li class="<?php if ( is_page('advertising') ) { ?>current_page_item<?php } else { ?>page_item<?php } ?>"><a>/advertising/" title="Advertise on My Blog">Advertise</a>
<li class="<?php if ( is_page('contact') ) { ?>current_page_item<?php } else { ?>page_item<?php }
?>"><a>/contact/" title="Contact Me">Contact</a>
</div> <?php
}
add_filter( 'wp_page_menu', 'childtheme_menu' );
Until here, no problems. They start here. Following the instructions from the developer, i did this:
1. Downloaded the images (lazy to create new images at this moment :), and placed then in my desired folder;
2. Css rules to my style.css. This:
.tooltip {
display:none;
background:transparent url(library/images/tips/black_arrow.png);
font-size:12px;
height:70px;
width:160px;
padding:25px;
color:#fff;
}
/* override the arrow image of the tooltip */
.tooltip.bottom {
background:url(library/images/tips/black_arrow_bottom.png);
padding-top:40px;
height:55px;
}
.tooltip.bottom {
background:url(library/images/tips/black_arrow_bottom.png);
}
3. Generated my .js here http://flowplayer.org/tools/download/index.html, and placed it in my desired folder; then called it this way:
// calling tips script
function tipscripting() {?>
<script src="library/js/jquery.tools.min.js" type="text/javascript"></script>
<?
}
add_action('wp_head','tipscripting');
And finally the code to show the balloon tips. This one didn't worked in none way i tried to use; always returns an errot like "Parse error: syntax error, unexpected '(', expecting T_VARIABLE or '$'".
// initialize tooltip
$("#menu a[title]").tooltip({
// tweak the position
offset: [10, 2],
// use the "slide" effect
effect: 'slide'
// add dynamic plugin with optional configuration for bottom edge
}).dynamic({ bottom: { direction: 'down', bounce: true } });
I really don't know where to put it. Hope someone can read this and find a solution to everyone who's interested in this baloon tips.