title: php jquery ajax json post via link attr title?
body: <p>I tried to post values from the link title attribute with <code>jquery ajax json post</code>. Here is my code. where is the problem? Why doesn't it work?</p>
  
  <p>main.php</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;     
      $(document).ready(function(){
          $(".link").click(function(){
          var aa = $(this).attr('title'); 
            $.ajax({
               url: "data.php", 
               dataType: "json", 
                 data: "number1="+aa, 
               success: function(json){ 
                  $("#result").html(json.number1); 
               }
            });
          });
      });
      &lt;/script&gt;
        &lt;a href="#" class="link" title="apple"&gt;A&lt;/a&gt;
        &lt;a href="#" class="link" title="banana"&gt;B&lt;/a&gt;
        &lt;a href="#" class="link" title="orange"&gt;O&lt;/a&gt;
          &lt;div id="result"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>data.php</p>
  
  <pre><code>&lt;?php
  $number1 = $_GET['number1'];
  echo json_encode($number1);
  ?&gt;
  </code></pre>