title: Audio wont play after loading contents with AJAX
body: <p>First of all im new to jquery i have tried googling my problem , spent hours to fix this and i couldn't find any , so here i am . </p>
  
  <p>In the below code i have fetched some information ( Songs details ) from database and loaded them to div via ajax .. Up to this point everything works just fine . </p>
  
  <p>script using to load content via AJAX</p>
  
  <pre><code>    $(document).ready(function() {
          $("#results" ).load( "ajax/profile_ajax.php"); //load initial records
  
          //executes code below when user click on pagination links
          $("#results").on( "click", ".pagination a", function (e){
              e.preventDefault();
              $(".loading-div").show(); //show loading element
              var page = $(this).attr("data-page"); //get page number from link
              $("#results").load("ajax/profile_ajax.php",{"page":page}, function(){ //get content from PHP page
                  $(".loading-div").hide(); //once done, hide loading element
              });
  
          });
      });
  
  
  &lt;div class="loading-div"&gt;&lt;img src="../pagination/ajax-loader.gif" &gt;&lt;/div&gt;
  &lt;div id="results"&gt;&lt;/div&gt;&lt;!-- content will be loaded here --&gt;
  </code></pre>
  
  <p>Script im using to play audio</p>
  
  <pre><code>$(function () {
      var curAudio;
      $(".playback").click(function (e) {
          e.preventDefault();
          var song = $(this).next('audio')[0];
  
          if (curAudio &amp;&amp; song != curAudio &amp;&amp; !curAudio.paused) {
              curAudio.pause();
              $(curAudio).prev().html('&lt;i class="fa fa-play"&gt;&lt;/i&gt; Play');
          }
  
          if (song.paused) {
              song.play();
              curAudio = song;
              $(this).html('&lt;i class="fa fa-pause"&gt;&lt;/i&gt; Stop');
          } else {
              song.pause();
              curAudio = undefined;
              $(this).html('&lt;i class="fa fa-play"&gt;&lt;/i&gt; Play');
          }
          curPlaying = $(this).parent()[0].id;
      });
  });
  </code></pre>
  
  <p>I have above code to played the fetched music . Now the problem is None of the Buttons are functional even though my code worked fine before i use AJAX . </p>
  
  <p>My Fecthed HTML is like this </p>
  
  <pre><code>&lt;div id="4"&gt;
  Track Name :- &lt;b&gt;Heros&lt;/b&gt;
  &lt;br /&gt;By :- &lt;a target="_blank" href="../members/profile.php?id=1"&gt;USER NAME&lt;/a&gt;
  &lt;br /&gt;
  &lt;button class="playback btn btn-primary btn-sm hdnbtn"&gt;&lt;i class="fa fa-play"&gt;&lt;/i&gt; Play&lt;/button&gt;
  &lt;audio src="../members/memberfiles/1/Heros.mp3"&gt;
      Your browser does not support HTML5 audio.
  &lt;/audio&gt;
  &lt;a class="btn btn-sm btn-success hdnbtn" href="../members/downloader.php?fld=1&amp;name=Heros.mp3" name="dwn"&gt;&lt;i class="fa fa-download"&gt;&lt;/i&gt; Download MP3&lt;/a&gt;
  &lt;button class="sharer btn btn-sm btn-danger hdnbtn" type="button"&gt;&lt;span class="fa fa-share-alt"&gt;&lt;/span&gt; Share&lt;/button&gt;
  &lt;a target="_blank" href="#" class="hide btn btn-sm btn-social btn-facebook socialhdn"&gt;&lt;i class="fa fa-facebook"&gt;&lt;/i&gt;  Share on Facebook&lt;/a&gt;
  &lt;a target="_blank" href="#" class="hide btn btn-sm btn-social btn-twitter socialhdn"&gt;&lt;i class="fa fa-twitter"&gt;&lt;/i&gt;  Tweet this &lt;/a&gt;
  &lt;a target="_blank" href="#" class="hide btn btn-sm btn-social btn-google-plus socialhdn"&gt;&lt;i class="fa fa-google-plus"&gt;&lt;/i&gt;  Share on goole&lt;/a&gt;
  &lt;br /&gt;
  &lt;a href="javascript:void();" class="cls_close hide btn-primary btn btn-xs"&gt;&lt;i class="fa fa-minus"&gt; Show Less&lt;/i&gt;&lt;/a&gt;
  &lt;input type="hidden" value="Heros.mp3" name="file_name"&gt;
  &lt;input type="hidden" value="bWVtYmVyZmlsZXMvMS9IZXJvcy5tcDM=" name="link"&gt;
  </code></pre>
  
  <p></p>
  
  <p>What i really need is to play the fetched content using the 2nd script (audio) i posted . i have no idea how to fix this . Tried hours of googling and various suggested methods. None of them worked for me . Please Point out what went wrong . i really appreciate it !</p>