D
D
Darya Shvakh2019-01-02 12:37:58
Fonts
Darya Shvakh, 2019-01-02 12:37:58

How to make JS "work out" in several blocks of the site?

There is a wonderful pen
. But the "trouble" is that it is worked out only in one in the very top block of the site.
How to make pen - universal, so that the script is processed in several blocks?
And in each block with the original (i.e. not the same) text.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2019-01-02
@DariaShvakh

Make a function that will take as parameters the element/selector and the text to display. Somehow so .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question