added checking param in $(elem)