Skip to content

Instantly share code, notes, and snippets.

@defunkt

defunkt/slide.js Secret

Last active December 26, 2021 15:32
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save defunkt/8138eab1b79877f193e7 to your computer and use it in GitHub Desktop.
Save defunkt/8138eab1b79877f193e7 to your computer and use it in GitHub Desktop.
Basic pushState() example
$('#slider a').click(function() {
history.pushState({ path: this.path }, '', this.href)
$.get(this.href, function(data) {
$('#slider').slideTo(data)
})
return false
})
@Francisc
Copy link

Francisc commented Mar 8, 2012

Always place semi-colons at the end of a statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment