Hey everyone,
I'm having a problem with a js code.
Indeed, I have a variable that allows me to retrieve the colors.
I manage to integrate it into the CSS to change the color of simple properties such as : the color of a text or a background
But it's seems like it is impossible to do it with the "linear-gradient" property or even scroll-bars.
Could you help me with this ? Here's the code that i use
$(function() {
// On lance la fonction sur tout le forum
$.each($('.bodyline'), function( index, value ) {
// Get the color of the group & put it in a variable
var color_gp = $(this).find('.firstword > span').css('color');
//var domm = document.getElementsByClassName('section-name');
//domm.style.color = color_gp;
// Condition based on the existence of the content of the variable color_gp
if (typeof(color_gp) != "undefined") {
// The colour of the group is placed on the texts.
$(this).find('.seventh-prof-doss-title b, .seventh-prof-bottom-left b, .poster-rango i, .tango n, .seventh-prof-bottom b, .seventh-prof-bio-right h1').css('color', color_gp);
// We place the color of the group on the backgrounds.
$(this).find('.seventh-prof-doss-2 span.gen, .background-gradiant, div.bouton-indic a').css('background', color_gp);
// We place the color of the group on the background of the scrollbars.
$(this).find('.profile-corpus-left::-webkit-scrollbar-thumb').css('backgroundColor', color_gp);
// We set the color of the group on the backgrounds in linear-gradient.
//var dom = document.querySelector("div.profil-pseudo strong b");
//dom.style.background = '-webkit-linear-gradient(to bottom right, ' + color_gp + ', #ffffff)';
// $('div.profil-pseudo strong b').css({
// 'background' : '-webkit-linear-gradient(to bottom right, '+color_gp+', #ffffff)',
// 'background' : '-moz-linear-gradient(to bottom right, '+color_gp+', #ffffff)',
// 'background' : '-o-linear-gradient(to bottom right, '+color_gp+', #ffffff)',
// 'background' : '-ms-linear-gradient(to bottom right, '+color_gp+', #ffffff)',
// 'background' : 'linear-gradient(to bottom right, '+color_gp+', #ffffff)'
//});
// Place the group color on the borders
$(this).find('.postfloater').css('outlineColor', color_gp);
}
});
});
Hopefully one of you can help me.
Thanks in advance
Good day / evening