Minimax methods for singular elliptic equations with an application to a jumping problem