Go to Top button not working
Author: U. HebeisenThe function "go to top" doesn't work on various browsers. I have activated this function in the Template section as described and afterward uploaded my site again. But afterwards this function didn't work when checked over the Internet (in preview everything looks ok).
I assume the Export function doesn't do his job right (maybe).
After that I exported the website to a local folder. Running the website that way shows the Up-arrow sometimes. For e.g. when narrow the window to the smallest width there is no button but in the PC-mode it will be shown.
Also I found that neither the button nor the Hamburger menu is working in Safari but in Chrome and Firefox.
Inspecting the files shows that to ones on the webhost haven't the javascript line added in the header area activating the imPageToTop_img and its function.
In my testsite there are one or more littel bugs like different background colors in the menu labels (depending on the browser). I will usually test my websites with Safari, Opera, Chrome and Firefox.
There is some work ahead I assume.
Author
After more testing for one evening I can say that the export function doesn't recognise the pages of my website as 'modified' if I check the "go to top" check box in the templates section in step 2. I have done this after my test site has been done and the whole site was uploaded before. In the setting I have choosen to just upload files that have changed.
And that seems to be the problem: the added line
x5engine.boot.push(function () { x5engine.imPageToTop.initializeButton({}); });
in the script part of the header is missing on the uploaded files. But I can find it in each file if I will export the website to a local folder.
U. Hebeisen
I cannot reproduce this problem sorry, but if you do a full site upload, does this resolve the issue?
(I once had this issue when the timezone of the host was different to mine, in this circumstance modified files would not upload, I had to wait nearly 24 hours because the time stamps on the hosted files was after the time stamps on my local files)
Author
Yes, a full site upload will do the job. I have also updated my X5 to v14.0.4.3 and I now on every page the scroll-to-top button is working now if I do an upload of changed files only.