added ability to use jQuery if provided instead of krona/element