How Do I Change the URL in the Browser URL Bar While Infinite Scrolling? What About Other Items in the Header?

Boy

@jdcharnell
BuSo Pro
Joined
Feb 21, 2018
Messages
371
Likes
573
Degree
2
I'm looking for the technical name for 2 things.

1. Infinite scrolling on websites, where when you get to the bottom of an article another article loads so you can keep scrolling down and reading.

2. Amend the URL from what looks like h1/h2s. Kinda like how Complex does with their Pokemon article (not allowed to post links, so search for "top 50 pokemon complex" if you want to.) Basically, as you scroll to different pokemon, the URL changes from /top-50/pikachu to /top-50/charmander.
 
2. Amend the URL from what looks like h1/h2s. Kinda like how Complex does with their Pokemon article (not allowed to post links, so search for "top 50 pokemon complex" if you want to.) Basically, as you scroll to different pokemon, the URL changes from /top-50/pikachu to /top-50/charmander.

I created a free version of this script for our DevSeries (has demos): Title Change to Header Text on Scroll - DevSeries
 
  • Like
Reactions: Boy
Code:
https://www.soundguys.com/best-headphones-of-2018-2559/
Anyone know how to get a clever scroll-based dynamic header like that with WordPress?
 
Anyone know how to get a clever scroll-based dynamic header like that with WordPress?
I'm not sure about wordpress, but it looks completely custom from what I see, the file is located here that has the code:

Code:
https://www.soundguys.com/wp-content/themes/aa/js/single.js

It starts around here
Code:
function review_top_bar()

I might have to steal this, cause it's pretty slick. Nice find! Looks like they stole it or the theme from something called
Code:
androidauthority.com

The code is slick, cause it's not calling a database or anything but simply copying elements from within the content as you scroll, so as long as you have the right HTML tags already in your content the scrolling bar will adjust accordingly.
 
Back