Here I want to apply a random background to a div (I copied my code on Creatiq) but I cannot integrate it into my div.
$(document).ready(function () {
function generate_colours () {
var colours;
var values = 'a','b','c','d','e','f','1','2','3','4','5','6','7','8','9','0'];
for ( c = 0; c<6; c++) {

  le = Math.floor(Math.random()*10);
    colours+=values[le]
};
return colours;

$('#Projects').css("background-color",colours);

};
generate_colours();
});
[gym t shirt for men](https://www.fuaark.com/gym-tshirt-men)

Aucune réponse