Jump to content

andreannast

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About andreannast

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Is your website live? If you send me a link I could maybe help you select the menu bar.
  2. I found a solution for the problem. The issue was that in the function getCursorPos(e) there is this line of code that returns NaN when the user is using a touch screen instead of a mouse. x = e.pageX - a.left This was because e.pageX doesn't work with touch and returns NaN. I needed to use e.touches[0].clientX instead. So I wrote an IF statement that was checking if the user has a touch device. If so then I used the e.touches[0].clientX, if not I used e.pageX to find the coordinate. Below is the complete function with the changes: function getCursorPos(e) { var a, x = 0;
  3. This example of an image comparison slider isn't working with touchscreens even though it is supposed to. I don't understand why. Sometimes it will move just a bit but most of the times not at all. Can someone point me in the right direction?
×
×
  • Create New...