title: JQuery unrecognized expression on Ajax response
body: <p>I have this JQuery Ajax Form.</p>
  
  <pre><code>$('#modal-body-sign-in').on('submit', '#sign-in', function(e) {
          e.preventDefault();
          var data = $(this).serialize();
          var url = $(this).attr('action');
          $.ajax({
              //this is the php file that processes the data and send mail
              url : url,
              type : "POST",
              data : data,
              dataType: "html",
              //Do not cache the page
              cache : false,
              //success
              success : function(data) {
                  //console.log(data.content);
  
                  console.log($(data));
                  //$('#modal-body-sign-in').html(data);
              }
          });
      })
  </code></pre>
  
  <p>on the response, when i <code>console.log(data); in the console it shows me the responded html</code> but when I  do this <code>console.log($(data));</code>it gives me this error</p>
  
  <p>Uncaught Error: Syntax error, unrecognized expression: </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;style&gt;
  ul {
      margin: 0%;
  }
  
  ul li {
      display: inline;
      list-style-type: none;
      float: left;
  }
  &lt;/style&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;!--  Ajax Container. DO NOT REMOVE THE DIV CONTENT  FOR AJAX ACCESS! --&gt;
      &lt;div id="content"&gt;
          &lt;div id="modal-body"&gt;
  
              &lt;form id="doLogin" name="doLogin" action="/HitPlay/doLogin" method="post"&gt;
  
                  &lt;fieldset&gt;
                      &lt;ul id="doLogin_" class="errorMessage"&gt;
              &lt;li&gt;&lt;span&gt;Incorrect username or password&lt;/span&gt;&lt;/li&gt;    &lt;/ul&gt;
  
                  &lt;br/&gt;           
  
                  &lt;br/&gt;
  
                      &lt;label&gt;Username&lt;/label&gt;                 
                      &lt;input type="text" name="userBean.username" value="" id="doLogin_userBean_username"/&gt;
                      &lt;br/&gt;
                      &lt;label&gt;Password&lt;/label&gt;
                      &lt;input type="password" name="userBean.password" id="doLogin_userBean_password"/&gt;
                      &lt;br /&gt;
  
                      &lt;input type="submit" id="doLogin_0" value="Submit"/&gt;
  
                  &lt;/fieldset&gt;
              &lt;/form&gt;
  
  
  
  
  
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt; jquery-1.9.0.min.js:2
  a.error jquery-1.9.0.min.js:2
  f jquery-1.9.0.min.js:2
  x jquery-1.9.0.min.js:2
  a jquery-1.9.0.min.js:2
  st.fn.extend.find jquery-1.9.0.min.js:2
  st.fn.st.init jquery-1.9.0.min.js:1
  st jquery-1.9.0.min.js:1
  $.ajax.success localhost:59
  f jquery-1.9.0.min.js:1
  p.fireWith jquery-1.9.0.min.js:1
  r jquery-1.9.0.min.js:3
  r
  </code></pre>
  
  <p>I was doing this</p>
  
  <pre><code>  $(data) 
  </code></pre>
  
  <p>because I want to get a fragment of the responded HTML page</p>