title: How to build a URL Query Strings with jQuery from content in multiple items using class name
body: <p>I am trying to build a URL that can be used in an iframe from content that's on a page. There are URL queries in that the paramaters can be passed into. </p>
  
  <p>so I'm hoping to build a url like <a href="http://www.example.com/iframe.aspx?title=&amp;itemnum=&amp;" rel="nofollow noreferrer">http://www.example.com/iframe.aspx?title=&amp;itemnum=&amp;</a></p>
  
  <p>The other catch is there are multiple itemNum's that need to be comma separated like Item1,Item2 and also titles like Title1,Title2</p>
  
  <p>Here is a n00bular start to this:</p>
  
  <pre><code>&lt;div id="options"&gt;
      &lt;h2&gt;Options&lt;/h2&gt;
      &lt;div class="grid"&gt;
              &lt;div class="grid"&gt;
                  &lt;div class="col"&gt;
                      &lt;div class="box"&gt;
                          &lt;span class="item-number"&gt;Item1&lt;/span&gt;
                          &lt;span class="title"&gt;Title1&lt;/span&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="col"&gt;
                      &lt;div class="box"&gt;
                          &lt;span class="item-number"&gt;Item2&lt;/span&gt;
                          &lt;span class="title"&gt;Title2&lt;/span&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
  
      // Page Variables for iFrame URL
      var itemNum = $('.item-number').html();
      var itemTitle = $('.title').html();
  
      // Build Params
      var params = { itemnum:$itemNum, title:$itemTitle };
  
      // Variable for full Query Strings
      var mapQs = jQuery.param( params );
  
      // Build Full URL root + query strings
      $( "iframe" ).src ( 'http://www.blah.com/' + mapQs );
  
  &lt;/script&gt;
  </code></pre>