Skip to content

Instantly share code, notes, and snippets.

@nickcernis
Last active September 15, 2015 18:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickcernis/4bbfb051855e880ed15b to your computer and use it in GitHub Desktop.
Save nickcernis/4bbfb051855e880ed15b to your computer and use it in GitHub Desktop.
Workaround for Parallax section scrolling on Rainmaker sites. Allows creation of click-to-advance “Continue Reading” buttons.
<!-- Buttons without the data-section attribute will be treated like regular links (no scroll) -->
<a class="button" href="http://example.com/contact/">Get in touch</a>
<!--
Button links with a data-section attribute can be used in
text content areas to autoscroll to the first element with
the class name specified in data-section.
-->
<!-- Home Section 1 text widget: -->
<a class="button" href="#" data-section="home-section-2">Continue Reading</a>
<!-- Home Section 2 text widget -->
<a class="button" href="#" data-section="home-section-3">Continue Reading</a>
<!-- Home Section 3 text widget -->
<a class="button" href="#" data-section="home-section-4">Continue Reading</a>
<!-- Home Section 4 text widget -->
<a class="button" href="#" data-section="home-section-5">Continue Reading</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment