There is such a script for getting three random numbers and constantly updating them:
var random = 1000; $('.qqq').each(function () { var element = $(this); setInterval(function () { random = randomizator(60000, 200000); }, 1000); setInterval(function () { showRandom(random, element); }, random); }) function randomizator(a, b) { return Math.floor(Math.random() * b) + a; } function showRandom(random, element) { element.text(random); } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id="test" class="qqq"></div> <div id="test2" class="qqq"></div> <div id="test3" class="qqq"></div> and it works great. But as soon as I reduce the range of values, I immediately start displaying the same values in all three: 1 1 1 , 4 4 4 , etc.
I need the numbers to be all different, not three identical. Help, please, to understand the novice developer.