corrected close of jQuery call