Remove jQuery dependency from javascript