<script>
jQuery('#tooltipclick').click(function(){
jQuery('#tooltip').toggle();
});
</script>
<div id="tooltip" style="display:none">my tooltip text</div>
<a id="tooltipclick">Click me!</a>$(function()
{
...document.ready code
});$(function()
{
jQuery('#tooltipclick').click{
jQuery('#tooltip').toggle();
});jQuery(function()
{
jQuery('#tooltipclick').click{
jQuery('#tooltip').toggle();
});I have to admit I did wonder about wrapping it in document.ready() or equivalent but as it seemed to work, I didn't pay it much attention.
Mind you, given that most of the JS I've done for ages has been working with Nao's event handling in Wedge, I tend to forget that somewhat...
jQuery(function()
{
jQuery('#tooltipclick').click{
jQuery('#tooltip').toggle();
});
});<html>
<head>
<script src="http://compagniaoltreconfine.com/beta/wp-content/themes/compagniaoltreconfine/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<div id="tooltip" style="display:none;text-align:right;position:absolute;width:1000px"><div id="dentrotooltip" style="float:right;width:auto;padding:12px;color:white;margin-top:-36px;background:none repeat scroll 0 0 rgba(0, 0, 0, 0.8);box-shadow:1px 1px 6px rgba(0, 0, 0, 0.5)">graphic design: <a href="http://drlm.it">drlm.it</a><br>web design: <a href="http://lorenzoraffio.com">lorenzoraffio.com</a></div></div>
<div id="barrasotto"></div>
<p style="margin-top:5px;text-align:right">
<a id="tooltipclick" style="color:darkred;border-bottom:1px dotted;font-size:11px;font-weight:bold">Credits</a>
</p>
<script>
jQuery('#tooltipclick').click(function(){
jQuery('#tooltip').toggle();
});
</script>
</body>
</html><html>
<head>
<script src="http://compagniaoltreconfine.com/beta/wp-content/themes/compagniaoltreconfine/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<div id="tooltip" style="display:none;text-align:right;position:absolute;width:1000px"><div id="dentrotooltip" style="float:right;width:auto;padding:12px;color:white;margin-top:-36px;background:none repeat scroll 0 0 rgba(0, 0, 0, 0.8);box-shadow:1px 1px 6px rgba(0, 0, 0, 0.5)">graphic design: <a href="http://drlm.it">drlm.it</a><br>web design: <a href="http://lorenzoraffio.com">lorenzoraffio.com</a></div></div>
<div id="barrasotto"></div>
<p style="margin-top:5px;text-align:right">
<a id="tooltipclick" style="color:darkred;border-bottom:1px dotted;font-size:11px;font-weight:bold">Credits</a>
</p>
<script>
jQuery(function()
{
jQuery('#tooltipclick').click(function(){
jQuery('#tooltip').toggle();
});
});
</script>Oh, instead of jQuery('#tooltipclick').\click{ your code is: jQuery('#tooltipclick').click(function(){
And works! ;)
tooltipclick
{
cursor: pointer;
}Secondly, you could just add a style rule to that element on its own:Code: [Select] tooltipclick
{
cursor: pointer;
}