Refactored jQuery operation to separate class