title: Toggle partial view with AJAX
body: <p>In my MVC-project I have this code for rendering a partial-view:</p>
  
  <p>Method:</p>
  
  <pre><code>public ActionResult ShowArtCollection()
          {
              var model = new ViewModel();
              model.ArtWorks = db.ArtWorks.ToList();
  
              return PartialView("_artcollection", model);
          }
  </code></pre>
  
  <p>AJAX:</p>
  
  <pre><code>$("#btnArt").click(function () {
  
          $.ajax({
              url: '/Home/ShowArtCollection',
              dataType: 'html',
              success: function (data) {
                  $('#artworks').html(data);
              }
          });
      });
  </code></pre>
  
  <p>I would like my <code>#btnArt</code> to be able to toggle the partial view. I mean that when the _artcollection is rendered by the click of the button, the next click should "unrender" the view. Any tips on how to achieve this?</p>