css - How to fill svg with a random color? -


i using code i'd fill , stroke color lo selected randomly array. css:

 <style>                 #svg.clickit .logo {           fill: #002100;           stroke: #002100;           transition: 1s;       }   </style>  

i use jquery, ie:

var random = math.floor(math.random()*array.length)  $('#svg.clickit .logo ').css({ fill: array[random], stroke: array[random] }) 

Comments