Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 504799

YouTube WD Scroll to Top Problem

$
0
0

Replies: 0

There is a problem with YouTube WD in that after the page loads it scrolls all the way back to the top of the page.

This seems to be an issue with not implementing Ajax properly. You can see the effect on the YouTube WD Demo page (load it, scroll down and wait until it fully loads and jumps to the top):
http://wpdemo.web-dorado.com/youtube-wd/?_ga=1.237626048.1545446523.1491685253

This isn’t good for users because they will likely scroll while the page loads and then get confused when the page bounces them all the way back to the top.

I tried fixing this with a custom #anchor scrolling javascript hack but it still jumps to the top before it scrolls back to the anchor. As I say, it’s a hack.

Researching this points to a simple fix with AJAX, but I don’t know anything about AJAX.

This StackOverflow suggestion uses a scrolltop hack:
http://stackoverflow.com/questions/9777563/scroll-to-top-after-ajax-content-load

Other sites suggest using javascript(void) somehow fixes this. Again, I don’t know where to look to implement this.

I feel like this is a simple fix and without it using YouTube WD will just annoy my users.

Thanks for any help!


Viewing all articles
Browse latest Browse all 504799

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>