I want to change the background color of div at runtime using jquery. The div is displaying but it's background color isn't changing. I don't know what is wrong with this code I have written.
<html>
<head>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
</head>
<body>
<div id="color" style="width:100px;height:100px;background-color:grey;">Hello, world!</div>
<script>
function change_color()
{
r = floor(Math.random()*256);
g = floor(Math.random()*256);
b = floor(Math.random()*256);
rgb = "rgb(" + r + ", " + g + ", " + b + ")";
$("#color").css("background-color", rgb);
}
setInterval(change_color, 1000);
</script>
</body>
</html>
I want rgb values in decimal.