Use $ as jQuery alias in factory function

There was an inconsistency as $ was already used at the bottom of the file