title: Uncaught TypeError: row.child.hasClass is not a function
body: <p>I'm creating row details for DataTables without Ajax.<br>
  I do somethink like this for show:  </p>
  
  <pre><code>$(document).ready(function () {
      function format ( name, value ) {
          return '&lt;div&gt;Name: ' + name + '&lt;br /&gt;Value: ' + value + '&lt;/div&gt;';
      }
      var table = $('#servicetable').DataTable({
          stateSave: true,
          pageLength: 10,
      });
  
      $('#servicetable tbody').on('click', 'button.test', function () {
          var tr = $(this).closest('tr');
          var row = table.row( tr );
          row.child( format( tr.data('child-name'), tr.data('child-value') ) ).show();
  
          if ( row.child.hasClass('shown') ) {
              // This row is already open - close it
              row.child.hide();
              tr.removeClass('shown');
          }
          else {
              // Open this row
              row.child( format(row.data()) ).show();
              tr.addClass('shown');
          }
      } );
  });
  </code></pre>
  
  <p>When I click button for open - everythink is ok, but when I click again for hide I getting error:  </p>
  
  <pre><code>Uncaught TypeError: row.child.hasClass is not a function
  </code></pre>
  
  <p>What's bad?<br>
  Here is demo: <a href="https://jsfiddle.net/tmc700bt/" rel="nofollow">JSFiddle</a></p>