Skip to content

Instantly share code, notes, and snippets.

@mrpotatoes
Last active April 7, 2016 19:02
Show Gist options
  • Select an option

  • Save mrpotatoes/b5ebe3dc19fc21847fa9fbb424b6be07 to your computer and use it in GitHub Desktop.

Select an option

Save mrpotatoes/b5ebe3dc19fc21847fa9fbb424b6be07 to your computer and use it in GitHub Desktop.
// $ = jQuery
//
// $('.by-keyword .submit').click(function(e) {
// var loc = window.location
// var query = '?search=' + $('.by-keyword input').val();
//
// console.log(loc.origin + loc.pathname + query);
//
// e.preventDefault();
// });
function thing() {
var loc = window.location
var query = '?search=' + $('.by-keyword input').val();
return loc.origin + loc.pathname + query;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment