Skip to content

Instantly share code, notes, and snippets.

@hijonathan
Created August 12, 2014 21:40
Show Gist options
  • Select an option

  • Save hijonathan/333ff358cb6f143c640b to your computer and use it in GitHub Desktop.

Select an option

Save hijonathan/333ff358cb6f143c640b to your computer and use it in GitHub Desktop.
Adding pushState with Appcues.
// Example click handler that uses pushState and Appcues.
$('.tab-navigation').on('click', 'a[href]', function(e) {
if (window.history && window.history.pushState) {
// Update the URL without reloading the page.
window.history.pushState({}, document.title, e.currentTarget.getAttribute('href'));
// Re-check Appcues against this new URL.
Appcues.check();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment