for (var i = 0; i < colors.length; i++) {
str += "<span class='ecolor' style='background-color:'" + colors[i] + "' title='" + colors[i] + "'></span>";
}
whats the correct order to write style='background-color:'" + colors[i] + "'
so it renders properly with background color. Currently its not working`
You close background-color just after colon:
not
but