The focusing properties of gold nanoslit lenses are controlled by changing the refractive index of liquid crystal fillings inside the nanoslits. When the liquid crystals are in the isotropic state, the nanoslit lenses have higher transmission than in the case when the liquid crystals are in the nematic state. Additionally, the lens that focuses TM-polarized light shows a sharper focus in propagation direction when liquid crystal is in isotropic state. Our numerical simulations show good agreement with our experimental results. Having external control over the focusing properties of nanoslit lenses could be beneficial for practical applications.