title: different random number in each div
body: <p>This is probably simple but I can't get it to work.</p>
  
  <p>I have working code that inputs random number inside div but it inputs same random number in all divs on the page.</p>
  
  <p>How can I input <strong>different</strong> random number in each div?
  Here is my code:</p>
  
  <pre><code>&lt;script&gt;
      var randomNumber = Math.random();
      var num = Math.floor((randomNumber * 75) + 15);
  
      jQuery('#sale').each(function() {
          jQuery(this).find('.savings').append(num);
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Yes I'm looping on # since class is inside, should I loop on class itself?
  Here is the html:</p>
  
  <pre><code>&lt;div class="col-md-6 itemcol"&gt;          
  &lt;div class=""&gt;  
  &lt;div id="sale" class="sale" style=""&gt;&lt;span class="savings"&gt;&lt;/span&gt;% OFF&lt;br&gt;&lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>SOLVED. Here is the final code if someone else finds it useful, changed $ to jQuery and adjusted numbers to go between 15-75.</p>
  
  <pre><code>&lt;script&gt;
  jQuery(document).ready(function() {
    jQuery("#sale .savings").each(function(){
          jQuery(this).text(createRandom());
      });
  
  function createRandom() {
          var Num = Math.floor((Math.random() * (75 - 15) + 1) + 15 );
          return Num;
      } 
  });     
  &lt;/script&gt;
  </code></pre>