[jQuery] Custom function called in toogle()

[jQuery] Custom function called in toogle()


Hello,
I use several time the same toggle function, like this:
$("input#regime_ltn_c").toggle(
function() {
$("table#regime_ltn").show("slow");
},
     function() {
     $("table#regime_ltn").hide("slow");
     }
);
So I would like to create a function to improve my code. There is a
failure somewhere because this doesn't work:
function display_regime(table_id) {
     function() {
     $(table_id).show("slow");
     },
        function() {
          $(table_id).hide("slow");
        }
     );
}
$("#regime_ltn_c").toggle(
display_regime("table#regime_ltn");
);
Thanks for your suggestions,
Damien