On 10/10/07, Olivier Percebois-Garve [EMAIL PROTECTED] wrote:
I want to store something in the first function (over) and use it in the
second (out).
-Olivier
Hi Olivier, I think this would work:
jQuery.fn.simpleTooltip = function(o){
var sharedVar;
$(this).hover(
function(){
This is correct.
In javascript the inner functions have access to the variables of the
outer function. They even retain that direct access after the outer
function has returned, allowing you to create private variables and
methods (through closure).
2 matches
Mail list logo