Simple noob question re: *removing* mouseclick sensing.

Simple noob question re: *removing* mouseclick sensing.

Hi - I'm new to JQuery (and pretty new to Javascript) so this is a very simple one probably. I'm wondering if anyone can help and save me several hours of trial and error?

I've been using the following JQuery line to toggle whether some text is hidden or shown. It was previously referenced directly by an id= tag on a DIV - i.e. was simply triggered when some other text in a DIV was clicked.

$('#slideToggle').click(function(){$(this).siblings('.mover').slideToggle();

However I needed to make this code's running conditional on a variable (so it only runs if the variable is in one particular state). To do this I've moved the line and nested it inside an If Then javascript function which is now called by a normal HTML link instead.

My question then is this: The Jquery code looks to be expecting a mouse click (the 'click' bit!) but it no longer needs to detect mouse clicks - I just need it to run every time it's run. What do I need to change to make it do this?

Thanks!! Jon