var selects = $('селектор'); foo(selects, true); function foo(selects, param) { selects.each(function(){alert(param);}) }