0

Here is the thing... In desktop browsers I used document.selection.createRange() and window.getSelection(); to get the highlighted text. And, I used onmouseup event to create an event on the selection of texts. Both are working on desktop platforms

But in Mobile browsers onmouseup event not working...

So what should I use instead of onmouseup event for smartphones

  • 1
    Possible duplicate: http://stackoverflow.com/questions/25135736/does-jquery-mouseup-event-work-on-touch-devices – fsinisi90 May 03 '17 at 19:39

2 Answers2

0

In mobile there is no mouse. These need to be replaced with touch and scroll events. (https://developer.mozilla.org/en/docs/Web/API/Touch_events)

l0ul0u
  • 101
  • 5
0

Use taphold event for smartphones and also use jquery mobile to make this happen.

GEEK
  • 16