Solutions Log

So I only have to figure things out once.

Passing a JavaScript Function as a Parameter to Another Function

function makeItRain (effect) {
    $('#something')[effect]();
}

makeItRain('slideToggle');

Note the lack of a ’.’ and the ’[]’s.

Source

Comments