validate user arguments
removing use of jQuery methods for performance and portability
simplifying tests