The bootstrap documentation on that topic is a little confusing to me. I want to achieve similar behaviour like in the docs with the affix navbar: The navbar is below a para
You need to remove .affix() from your script.
.affix()
Bootstrap gives the option of accomplishing things either via data-attributes or straight JavaScript most of the time.
data-attributes