title: AJAX POST from a href class
body: <p>I have a problem with my script. Why this AJAX don't do anything..
  Thanks For help..</p>
  
  <p>In body tag </p>
  
  <pre><code>&lt;div class="share_playlist"&gt;    
      &lt;a href="#" data-toggle="tooltip" title="add to playlist" class="plyshr" id="&lt;?php echo $tracks['track_id']; ?&gt;"&gt;
          &lt;img src="assets/img/ico/share_icon.png" width="28"&gt;
      &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and AJAX</p>
  
  <pre><code>$(document).ready(function(){ 
  
      $(".plyshr").click(function() {
          var id = $(this).attr('id');
      var dataString = 'id='+ id ;
      var parent = $(this);
          //alert (data);
          $.ajax({
              type: "POST",
              url: "playlist.php",
              success: function(html)
              data:  dataString,
              cache: false,
              success: function(html)
          }).done(function( msg ) {
          parent.html(html);
          });
      });
  });
  </code></pre>
  
  <p>some more details</p>
  
  <p>And in playlist.php</p>
  
  <pre><code>include 'connect.php';
  session_start();
  $ip=$_SESSION['id'];
  if ($_POST['id'])
  {
      $id=$_POST['id'];
      $ip_sql="insert into playlist (id_user, track_id) values ('$ip','$id')";
      $list = mysql_query($ip_sql);
      if(isset ($list)){
          echo ("succes");
      }
      else
      {
          echo("failed");
      }
  }   
  </code></pre>