refactor function call

removes jQuery use