On Load function does not trigger on iPhone

APD Toronto
APD Toronto used Ask the Experts™
on
Hi Experts,

When you open http://aces-project.com/2017/_NEW.php on iPhone portrait you will notice that the slogan "We Dont Overpromise. We Deliver!" is very small, but when you change it to landscape then back to portrait is fine. This is triggered by sloganResize() within js/header.js which I am calling from both $(window).resize() and $(window).on('load'), but the onload call is doesn't seem to be triggered?

Any help will be greatly appreciated.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Shaun VermaakSenior Consultant
Awarded 2017
Distinguished Expert 2018

Commented:
When you say iPhone, do you mean Safari browser on iPhone or which browser(s)?
APD TorontoSoftware Developer

Author

Commented:
iPhone 6 Plus, both Safari and Chrome
Owner (Aidellio)
Most Valuable Expert 2015
Commented:
Safari doesn't support the load event anymore, use pageshow

See the section under supported events at the bottom
https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW5
APD TorontoSoftware Developer

Author

Commented:
I changed to the pageshow event, and the slogan disappeared.

Please see original link

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial