Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMars Epaecap
5,110 PointsI hosted this example on a webpage and it works on my laptop.I tried this in my Iphone and it didn't work. Why?
I hosted this example on a webpage and it works on my laptop.I tried this in my Iphone and it didn't work. Why?
1 Answer
Joshua Hardy
17,317 PointsYour iPhone uses Safari, which is not a good web browser to use for TreeHouse.
Nick Trabue
Courses Plus Student 12,666 PointsNick Trabue
Courses Plus Student 12,666 PointsMy understanding is Safari has a bug with const where if you define it with the same name as the id of the element it is selecting it won't work. Try changing the name of your const variable and see if it works or try to use var instead. Unfortunately this will happen no matter what browser you put on your iPhone. Even chrome is just a wrapper around the safari window on iOS.
More on the bug