title: Value of the input field submitted
body: <p>I'm trying to get the value of the input field from the button that is clicked, but I'm only able to get the value of the first input field.</p>
  
  <p>What am I doing wrong? </p>
  
  <p>Also, should someone enter data into both fields, it's just the value of the button that is clicked. </p>
  
  <p>Here's my fiddle: <a href="http://jsfiddle.net/60kwpzqw/1/" rel="nofollow">http://jsfiddle.net/60kwpzqw/1/</a></p>
  
  <pre><code> dbsearch = ['.googlebtn','.amazonsbtn'];
   dbid = ['#google','#amazon'];
   sselector = dbsearch.join(", ");
   idselector = dbid.join(", ");
      $(sselector).click(function(event) {
        keyword = $(idselector).val();
         $(keyword).val(keyword);
         myClass = $(this).attr("class").split(' ')[2];
         BtnRank = $(this).index('button');
         alert('BtnRank: '+BtnRank+' '+myClass+' '+keyword);
         event.preventDefault(); 
     });
  </code></pre>