title: Jquery Cross does not appear from the beginning
body: <p>I have coded this accordion and it is working but it has a bug, when you open the page the + does not show from the beginning.</p>
  
  <p>I used data content attribute to get the + because the css has a before pseudoclass and the functionality is working.</p>
  
  <p>But the x  does not appear from the beginning just the square when you click the second time it works.</p>
  
  <p>I assume there is something missed in the code but I can figure out what</p>
  
  <p><a href="http://www.rogemateos.com/onlinetest/exercise03/" rel="nofollow noreferrer">javascriptexerciselink</a></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>// Add your custom js here
  
  $(document).ready(function () {
      //toggle the component with class RevealCard-list
      $(".RevealCard-header").click(function () {
          if ($(this.id + ' .RevealCard-list').is(':visible')) {
              $(this.id + ".RevealCard-list").slideUp(300);
              $(this).attr('data-content', '+');
          } else {
              $(this.id + " .RevealCard-list").slideDown(300);
              $(this).attr('data-content', '-');          
          }
      });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>/* Modify this file as required */
  
  .RevealCard {
    font-family: sans-serif;
  }
  
  .RevealCard-header {
    background: #000;
    border-radius: 4px 4px 0 0;
    color: #fff;
    font-size: 1.2em;
    font-weight: normal;
    margin: 0;
    padding: 0.5em;
    position: relative;
  }
  
  .RevealCard-header::after {
    border: 1px solid #fff;
    content: attr(data-content);
    height: 1.15em;
    line-height: 1em;the 
    position: absolute;
    right: 0.5em;
    text-align: center;
    width: 1.15em;
  }
  
  .RevealCard-list {
    border: 1px solid #000;
    border-top: none;
    margin: 0 0 2em 0;
    padding-bottom: 1em;
    padding-top: 1em;
   display: none;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Exercise 3&lt;/title&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
    &lt;link rel="stylesheet" href="../css/main.css"&gt;
    &lt;link rel="stylesheet" href="exercise03.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
    &lt;div class="RevealCard"&gt;
      &lt;h3 class="RevealCard-header"&gt;
        Top five loves
      &lt;/h3&gt;
      &lt;ol class="RevealCard-list"&gt;
        &lt;li&gt;First item&lt;/li&gt;
        &lt;li&gt;Second item&lt;/li&gt;
        &lt;li&gt;Third item&lt;/li&gt;
        &lt;li&gt;Fourth item&lt;/li&gt;
        &lt;li&gt;Fifth item&lt;/li&gt;
      &lt;/ol&gt;
    &lt;/div&gt;
  
    &lt;div class="RevealCard"&gt;
      &lt;h3 class="RevealCard-header"&gt;
        Top five hates
      &lt;/h3&gt;
      &lt;ol class="RevealCard-list"&gt;
        &lt;li&gt;First item&lt;/li&gt;
        &lt;li&gt;Second item&lt;/li&gt;
        &lt;li&gt;Third item&lt;/li&gt;
        &lt;li&gt;Fourth item&lt;/li&gt;
        &lt;li&gt;Fifth item&lt;/li&gt;
      &lt;/ol&gt;
    &lt;/div&gt;
  
    &lt;script src="https://code.jquery.com/jquery-3.2.0.min.js" integrity="sha256-JAW99MJVpJBGcbzEuXk4Az05s/XyDdBomFqNlM3ic+I=" crossorigin="anonymous"&gt;&lt;/script&gt;
    &lt;script&gt;window.jQuery || document.write('&lt;script src="../js/vendor/jquery-3.2.0.min.js"&gt;&lt;\/script&gt;')&lt;/script&gt;
    &lt;script src="../js/plugins.js"&gt;&lt;/script&gt;
    &lt;script src="../js/main.js"&gt;&lt;/script&gt;
    &lt;script src="exercise03.js"&gt;&lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>