title: Getting Error While setting icon in List Uncaught TypeError: Cannot set property 'innerHTML' of undefined
body: <p>Getting Error While setting icon in Top 3 row of list</p>
  <pre class="lang-js prettyprint-override"><code>$(document).ready(function() {
    var navItems = document.getElementsByClassName(&quot;icon&quot;);
    for (var i = 0; i &lt; 3; i++) {
      navItems[i].innerHTML = '&lt;i class=&quot;fa fa-gift&quot; aria-hidden=&quot;true&quot; style=&quot;color: #ff8944;font-size: 19px;&quot;&gt;&lt;/i&gt;'
    }
  });
  </code></pre>