title: jQuery: can't get the value of element
body: <p>I can't get the value of the element in spring boot template, my template:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$("#article-list .list-item").click(function() {
    console.log($("#test").val());
  });
  $(document).ready(function() {
    $("#article-list").css("background-color", "red");
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns:th="http://www.thymeleaf.org"&gt;
    &lt;body&gt;
      &lt;ul id="article-list"&gt;
        &lt;h1 id="test"&gt;this is the test content&lt;/h1&gt;
        &lt;li class="list-item"&gt;
          &lt;h2 class="article-title"&gt;title&lt;/h2&gt;
          &lt;p class="article-excerpt"&gt;content&lt;/p&gt;
          &lt;span class="article-time"&gt;2017-12-22&lt;/span&gt;
        &lt;/li&gt;
        &lt;li class="list-item"&gt;
          &lt;h2 class="article-title"&gt;title&lt;/h2&gt;
          &lt;p class="article-excerpt"&gt;content&lt;/p&gt;
          &lt;span class="article-time"&gt;2017-12-22&lt;/span&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
      &lt;script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"&gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The value of <code>h1</code> always null, I can't get it. And, I've tested the <code>jQuery</code>, it works. Using jQuery to change the <code>ul</code> element background color, it's ok. Like this:</p>
  
  <p>But I can't get the value of <code>h1</code></p>