title: AJAX live search working with radio button
body: <p>I'm able to get jQuery AJAX live search working on an input field and it returns the desired result that I want.
  for example : Search for my word returns the desired result .</p>
  
  <p>But Now I want to do a compound search on two fields. 
  for example : 
  Search for the word + today
  or
  Search for the word + tomorrow
  This is what I have but it is not working or does not returning any errors.</p>
  
  <p>index.php</p>
  
  <pre><code>&lt;form&gt;
          &lt;input placeholder="Search the area" class="input-large search-query" type="text" id="key"&gt;
          &lt;input type="radio" name="b_selected" class="radio" value="1"  &gt; Today
          &lt;input type="radio" name="b_selected" class="radio"  value="2"  &gt; Tomorrow&lt;br&gt;
              &lt;div class="result"&gt;&lt;div class="loading"&gt;&lt;/div&gt;&lt;/div&gt;
              &lt;/form&gt; 
  </code></pre>
  
  <p>quicksearch.php</p>
  
  <pre><code>include('config.php');
  $count= 0;
   if(isset($_POST["b_selected"]))
        {  $b_selected =  $_POST['b_selected'];   }
  
  $key =  $_POST['key'];
  $b_selected =  $_POST['b_selected'];
  
  $key = addslashes($key);
  $sql = mysql_query("select * from account WHERE b_today='1' and title LIKE '%$key%'  ") or die(mysql_error());
  
      While($row = mysql_fetch_array($sql)) {
      $count++;
      $id= $row['id'];
      $title=$row['title'];
  
      if($count&lt;= 10){
  </code></pre>
  
  <p>search.js</p>
  
  <pre><code> /*quick search*/
  
                  $(document).ready( function() {
                              $(".result").hide();
  
                  $("#key").keyup( function(event){
                      var key = $("#key").val();
  
                      if( key != 0){
                          $.ajax({
                          type: "POST",
                          data:{ key: key },
                          url:"quicksearch.php",
                          success: function(response) {
                          $(".result").slideDown().html(response);
                          }
                          })
  
                          }else{
  
                          $(".result").slideUp();
                          $(".result").val("");
                          }
                   })
  
                  })
  
                  /* Search for work plan for today or Tomorrow*/
  
                     $(document).ready(function(){
                        $('input[type="radio"]').click(function(){
                             var b_selected = $(this).val();
                             $.ajax({
                                  url:"quicksearch.php",
                                  method:"POST",
                                  data:{b_selected:b_selected},
                                  success:function(data){
                                       $('#result').html(data);
                                  }
                             });
                        });
  
  
  });
  </code></pre>