I feel like this should work, but doesn't. Not sure what I'm doing wrong.
function addURL()
{
$(this).attr('href', function() {
return this.href + '&cylnders=12';
}
<a onclick="addURL();" href="/search-results/?var1=red&var2=leather">Click this</a>