title: jQuery Sizzle syntax error - uncaught expression
body: <p>I migrated from jQuery 1.6 (can't remember exact version) to jQuery 3.3.1 and I'm getting error in following code:</p>
  <pre class="lang-js prettyprint-override"><code>//datatable row click events
  $('#@mainDatatableName tbody').on('click', 'tr', function () {
      checkForChange('#details-box', function () {
          //this will enable details refresh
          $('#detailsTab1 #Id').val(0); 
  
          debugger
  
          //force active detail to reload
          $('a[data-target=' + currentActiveTabContentId + ']').click();
      });
  });
  </code></pre>
  <p>The syntax error goes as follows:</p>
  <pre class="lang-none prettyprint-override"><code>jquery-3.3.1.js:1541 Uncaught Error: Syntax error, unrecognized expression: a[data-target=#detailsTab1]
  at Function.Sizzle.error (jquery-3.3.1.js:1541)
  at Sizzle.tokenize (jquery-3.3.1.js:2193)
  at Sizzle.select (jquery-3.3.1.js:2620)
  at Function.Sizzle [as find] (jquery-3.3.1.js:845)
  at jQuery.fn.init.find (jquery-3.3.1.js:2873)
  at new jQuery.fn.init (jquery-3.3.1.js:2983)
  at jQuery (jquery-3.3.1.js:139)
  at UsersAdmin:1696
  at checkForChange (domis.common.js:43)
  at HTMLTableRowElement.&lt;anonymous&gt; (UsersAdmin:1693)
  </code></pre>
  <p>I don't understand why I'm getting this error. In the previous jQuery version this error didn't show up and the code worked. Was there a change in syntax in the new jQuery version or something else?</p>