iscroll5+ on iOS, Android Click events not compatible workaround

Source: Internet
Author: User

Bug Description:

The Click event cannot be triggered under iOS, android4.4+.

Bug fixes:

Call the Iscroll plugin to add configuration parameters: Click:true/false

Click the value is to judge according to mobile terminal equipment, if it is simply to determine the type of terminal, android4.4+ still can not click, this is an android pit, after all, there is no unified iOS system.

So add a function to judge:

######## #function Iscrollclick () {if (/iphone|ipad|ipod| Macintosh/i.test (navigator.useragent)) return false;if (/chrome/i.test (navigator.useragent)) return (/Android/ I.test (navigator.useragent)); if (/silk/i.test (navigator.useragent)) return False;if (/android/i.test ( navigator.useragent)) {   var s=navigator.useragent.substr (navigator.userAgent.indexOf (' Android ') +8,3);   Return parsefloat (S[0]+s[3]) < 44? False:true    }}

Configuration instance:

Myscroll = new Iscroll ("#ID", {Click:iscrollclick (),//Call judgment function        scrollbars:true,//have scroll bar        mousewheel:true,// Allow pulley scrolling        fadescrollbars:true//scroll bar, default shadow, and fade-in effect    });

iscroll5+ on iOS, Android Click events not compatible workaround

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.