jQuery calling a predefined function

Posted by Mircea on Stack Overflow See other posts from Stack Overflow or by Mircea
Published on 2010-04-27T16:59:10Z Indexed on 2010/04/27 17:03 UTC
Read the original article Hit count: 377

Filed under:
|

I have a big function defined and executed on an element click. Is there a way to execute again that "big" function later, call it somehow, without writing it again?

$('#element').click(function(big){
    some big function
    ...
    ...
});


$('#another_element').click(function(){
    this should execute the previous "big" function
});

Thanx.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about function