title: Check if any row is selected in jQuery DataTables
body: <p>I am trying to write a function to check if any of the table rows are selected.</p>
  
  <p>I need this function to be triggered at any <code>&lt;tr&gt;</code> click.</p>
  
  <p>Thank you.</p>
  
  <p>Here is my code for selecting rows:</p>
  
  <pre><code>$('#Request tbody').on('click', 'tr', function () {
       if ($(this).hasClass('selected')) {
            $(this).removeClass('selected');
       } else {
            oTable.$('tr.selected').removeClass('selected');
            $(this).addClass('selected');
       }
  });
  </code></pre>