Hi all

I'm using the Tooltip plugin (http://bassistance.de/jquery-plugins/
jquery-plugin-tooltip/) on a test page (http://www.nottingham.ac.uk/
~ntzfr/test/ajax/jquery/jquery_formtest1.html). It works fine as it
stands. I want the user to be able to toggle tooltips on/off, and a
demo on the plugin page uses the code:

$("#block").click($.tooltip.block);

to call the click event of the button id "block". That also works.
What I then want is to display the tooltip status by changing the
button text, which I thought I could do with a function. However, the
following does nothing, though doesn't throw any errors:

                $("#block").click(function()
                        {
                                $.tooltip.block;
                                alert ('woo-hoo');
                        });

The alert box displays ok. So can anyone tell me why $.tooltip.block
works on its own but not in a function?

More generally, and here my jQuery newbie ignorance is showing, what
is 'block' - a method or a property? What does the line
$.tooltip.block actually mean? In this case $ isn't a selector but
just shorthand for 'jQuery', so it looks like it says 'run the method
jQuery.tooltip.block'.

TIA for any tips/advice.

Cheers

Fred

Reply via email to