title: click subscribe/unsubscribe button more than once without having refresh whole page
body: <p>I want users on my page to be able to subscribe and unsubscribe to each other as many times as they want without having to refresh whole page between each click...</p>
  
  <p>To that end I have a subscribe/unsubscribe button...<br>
  And it works fine... when user clicks it updates the database and switch to the oppsite (subscribe->unsubscribe, and vice/versa)...</p>
  
  <p>The problem is that after button-click and subsequent button-change the new button is now inactive and user has to refresh whole page to make it active again...</p>
  
  <p>How do I fix this?</p>
  
  <p>Code for those who need it:<br>
  c.php (channel page) / v.php (video page) // the setup on both pages is the exact same for this button</p>
  
  <pre><code>&lt;div class="row" id="subscribeAll"&gt;
      &lt;div class="col-xl-9 col-lg-8 col-md-7 col-sm-6 col-xs-12 col-12"&gt;
          // some stuff (not relevant)
      &lt;/div&gt;
      &lt;div class="col-xl-3 col-lg-4 col-md-5 col-sm-6 col-xs-12 col-12" id="subscribe"&gt;
          // if user logged in show content below
              // if user viewing own channel/video
                  &lt;button type="button" class="btn btn-lg btn-dark" disabled&gt;
                      Subscribers // show number of subscribers
                  &lt;/button&gt;
              // else
                  &lt;button type="button" class="btn btn-lg // if not subscribed btn-success // else btn-danger" id="// if not subscribed subscribeButton // else unsubscribeButton" value="// randomstring of user whose channel/video user is watching"&gt;
                      // if not subscribed Subscribe // else Unsubscribe // show number of subscribers
                   &lt;/button&gt;
      // else if user not logged in show content below
          &lt;button type="button" class="btn btn-lg btn-dark" disabled&gt;
              Subscribers // show number of subscribers
          &lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>jQuery.js</p>
  
  <pre><code>// Subscribe
  $(document).ready(function(){
      "use strict";
      $('button[id^="subscribeButton"]').on('click',function(){
          var self = $(this);
          var randomStringUser = self.val();
          $.ajax({
              type: "POST",
              url:'subscribe.php',
              data:"randomStringUser="+randomStringUser,
              success:function(){
                  var subscribe = self.closest('#subscribeAll').find('[id^="subscribe"]');
                  subscribe.load(location.href + " #subscribe&gt;*", "");
              }
          });
      });
  });
  
  // Unsubscribe
  $(document).ready(function(){
      "use strict";
      $('button[id^="unsubscribeButton"]').on('click',function(){
          var self = $(this);
          var randomStringUser = self.val();
          $.ajax({
              type: "POST",
              url:'unsubscribe.php',
              data:"randomStringUser="+randomStringUser,
              success:function(){
                  var subscribe = self.closest('#subscribeAll').find('[id^="subscribe"]');
                  subscribe.load(location.href + " #subscribe&gt;*", "");
              }
          });
      });
  });
  </code></pre>
  
  <p>Hope someone can help...</p>