Bug in functions.js; please fix!
-
When a custom image is added to the masthead, the menu bar may well jump to the top of the page after scrolling just a small amount. The behavior is unpredictable – many browsers will correct this behavior once the image is cached, but this is by no means universal.
It’s caused by the computation of mastheadOffset taking place immediately the DOM is loaded – but before the image is initially loaded.
Changing line 63 of functions.js from this:
$( function() {
to this:
_window.load( function() {
fixes the problem.P.S. I originally asked about this behavior, identifying it, wrongly, as a Safari bug. It can affect any browser. It was a response from the jQuery forum that gave me the solution. ??
- The topic ‘Bug in functions.js; please fix!’ is closed to new replies.