This is a known issue for iScroll and it only seems to happen in iOS5 where the menu completely stops working. All my sub links in iScroll are hash anchors. Does anyone have a workaround for this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The way I handled it was to hijack the anchor links themselves and replace them with
scrollToElementcalls instead.This code should only hijack links that begin with
#. It then handles thescrollToElementin asetTimeoutwhich fixes some other intermittent bugs. It works well on my end as long as your anchors are properly named with id’s. If you are usingnameattributes instead ofidattributes, you’ll need to rewrite these.This code will copy
nameattributes and put them in theidattribute if it is blank. You probably won’t need this, though.