function makeItRain (effect) {
$('#something')[effect]();
}
makeItRain('slideToggle');
Note the lack of a ’.’ and the ’[]’s.
function makeItRain (effect) {
$('#something')[effect]();
}
makeItRain('slideToggle');
Note the lack of a ’.’ and the ’[]’s.