Get query params in js with https://github.com/allmarkedup/jQuery-URL-Parser
$.url().param('search');