Skip to content

Instantly share code, notes, and snippets.

@kylerush
Created September 2, 2014 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylerush/6d7cf6fc5679711d7465 to your computer and use it in GitHub Desktop.
Save kylerush/6d7cf6fc5679711d7465 to your computer and use it in GitHub Desktop.
var getParameterByName = function (name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
if(getParameterByName(signup_text) === '1'){
jQuery('#signup-button').val('Get started');
} else if(getParameterByName(signup_text) === '2') {
jQuery('#signup-button').val('Sign up now');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment