title: join() or append to the end of a URL with jquery or javascript in Shopify Framework
body: <p>I would like to add &quot;+20-30&quot; to the end of my URL below when clicking a button.</p>
  <p>Currently I have:
  mydomain.com/collections/mens/white</p>
  <p>I would like my URL to be
  mydomain.com/collections/mens/white+20-30</p>
  <pre><code>   &lt;div class=&quot;clearfix filter&quot;&gt;
              {% assign tags = 'White, Grey, Tan, Neutral, Blue, Black' | replace: ' ,', ',' | replace: ', ', ',' | split: ',' %}
              &lt;p&gt;Filter Color&lt;/p&gt;
               &lt;div id=&quot;dd&quot; class=&quot;mywrap-dropdown-2&quot; tabindex=&quot;2&quot;&gt;Select
                      &lt;ul class=&quot;dropdowner&quot; id=&quot;coll-filter&quot;&gt;
                          &lt;li&gt;&lt;a href=&quot;&quot;&gt;All&lt;/a&gt;&lt;/li&gt;
                          {% for tag in tags %}
                        {% if current_tags contains tag %}
                        &lt;li&gt;&lt;a href=&quot;{{ tag | handle }}&quot; class=&quot;selected&quot;&gt;{{ tag }}&lt;/li&gt;
                        {% elsif collection.all_tags contains tag %}
                        &lt;li&gt;&lt;a href=&quot;{{ tag | handle }}&quot;&gt;{{ tag }}&lt;/li&gt;
                        {% endif %}
                        {% endfor %}
                      &lt;/ul&gt;
                  &lt;/div&gt;   
          &lt;/div&gt;
  </code></pre>
  <p>jQuery:</p>
  <pre><code> $('#coll-filter li a').on('click', function () {
    var newTags = [];
    jQuery('#coll-filter li a').each(function() { 
      if (jQuery(this).attr('href')) {
      newTags.push(jQuery(this).attr('href'));
    }
  });
   if (newTags.length) {
     var query = newTags.join('+');
     var newhref = jQuery('{{ 'tag' | link_to_tag: 'tag'    }}').attr('href').replace('tag', query);
      jQuery(this).attr(&quot;href&quot;, newhref)
     } 
    else {
       {% if collection.handle %}
       window.location.href = '/collections/{{ collection.handle }}';
        {% elsif collection.products.first.type == collection.title %}
      window.location.href = '{{ collection.title | url_for_type }}';
       {% elsif collection.products.first.vendor == collection.title %}
      window.location.href = '{{ collection.title | url_for_vendor }}';
      {% endif %}
  
    }
   });
  </code></pre>