SweetAlert integration and jquery conversions