cong-min / TagCloud

☁️ 3D TagCloud.js rotating with mouse
https://cong-min.github.io/TagCloud/examples
MIT License
356 stars 91 forks source link

Does TagCloud support click event and custom color? #7

Closed kybetter closed 4 years ago

kybetter commented 4 years ago

I have these two demand right now, and I browse TagCloud source code but can't find relation setting.

Can you add these two attributes? I think it is a most people's demand.

^_^

whelmin commented 4 years ago

You can use event delegation to add custom events, add classes to the container, and complete custom styles. For these demand, we have perfected the documentation. You can read more details in the README

kybetter commented 4 years ago

Thank you, I got it. In fact, I want every child has different color, and I wrote style bellow:

.diy .tagcloud--item:nth-child(0) {
    color: #67C23A;
}
.diy .tagcloud--item:nth-child(1) {
    color: #67323b;
}
// more...