Fixes broken build: Use jquery to get the element position in the page
Fixes this broken build: https://gitlab.com/gitlab-org/gitlab-ce/builds/9724713 by using jQuery to get the vertical position
MR that introduced the test, https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8773