Return url query string with map()
<p>I want this script to return me an url query string depending on what is checked on a list-item element.</p>

<pre><code>function makeQuery(){
    var catRes = $('.options input[type="checkbox"]:checked').map(function() {
      return $(this).val();
    }).get().join(", ");
    $('.catQuery').val(catRes);
}

$('.options input[type="checkbox"]').click(function(){
    makeQuery();
});
</code></pre>

<p>HTML</p>

<pre><code>&lt;input type="hidden" class="catQuery" value="&lt; map() result here &gt;"/&gt;
&lt;ul class="options"&gt;
    &lt;li&gt;&lt;input type="checkbox" value="url1"/&gt;Item 1&lt;/li&gt;
    &lt;li&gt;&lt;input type="checkbox" value="url2"/&gt;Item 2&lt;/li&gt;
    &lt;li&gt;&lt;input type="checkbox" value="url3"/&gt;Item 3&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>I know that the result I get is now url1,url2,url3 but I would like that it create a string equivalent to this</p>

<blockquote>
  <p>?url1=1&amp;url2=1...</p>
</blockquote>

<p>Depending on which input is checked.</p>
