How to change css of div having dynamic ID

Joined
Nov 19, 2019
Messages
1
Reaction score
0
Hi,

I have a div, ID is changing dynamically on each page load/refresh page like below

indicator-total-amountt-comp370Label
indicator-total-amountt-comp399Label
indicator-total-amountt-comp640Label....keep changing

Is it possible that I could read the starting characters "indicator-total-amountt-comp" and not the full ID than change the css?

Any help will be highly appreciable


Regards
 
Joined
Nov 27, 2019
Messages
163
Reaction score
28
This question makes very little sense. By ID are you talking about an HTML attribute? If yes they are really long and I am wondering why. Do they really need that length? How are you planing on reading the ID and changing the css? No just identifying the "indicator-total-amountt-comp" and changing the css is the same as randomly changing the css without identifing anything.

Wouldn't the css depend on the number in the ID?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top