U
U
Uncle_Bens2019-01-31 16:55:01
JavaScript
Uncle_Bens, 2019-01-31 16:55:01

How to set the appropriate color for the title of each block?

There are several blocks, each block has its own color, you need the title under the block to be of the corresponding color. Now it turns out that he takes the last value of the variable and applies it to everything. Logically it should be an array? Or what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FeST1Val, 2019-01-31
@Uncle_Bens

Here is the error. You apply to everyone. Replace with this: it should work

$(this).parent().find('.block_header').css('color', hexColor);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question