jquery - Update Contents of JQueryUI Tooltip in Realtime on Mobile -
i have follow/unfollow button , using jquery ui tooltips display button's title. when button clicked, change button's title + update tooltip (without user having move mouse away , re-hover on button) so:
el.title = 'follow'; $('#follow').tooltip("option", "content", "follow"); $(this).mouseover();
is there way replicate behaviour on mobile devices? , if not, there better way update tooltip content work both desktop , mobile?
on mobile may need resort touch events full consistency. "click" on mobile emulated; synthesized touchstart followed touchend on same element. mouseover/in , mouseexit/leave/out events non-starters in touch devices.
i try attaching code sequence you've included above not click event, touchend event.
for additional details on touch event api, can refer mdn (https://developer.mozilla.org/en-us/docs/web/api/touch_events); apple has perhaps longest-standing such document (https://developer.apple.com/library/ios/documentation/appleapplications/reference/safariwebcontent/handlingevents/handlingevents.html). latter page has information on how traditional mouse events "inferred" touch device.
Comments
Post a Comment