I'm assuming $elm is already a jQuery object since it is $elm.