File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 85
85
< script >
86
86
document . getElementById ( 'chile' ) . addEventListener ( 'click' , function ( ) {
87
87
console . log ( 'Chile clicked' ) ;
88
- // Change the hero image source
89
- document . getElementById ( 'hero' ) . src = "./static/public/Chile.png" ;
90
-
91
- // Change the color of the hero text
92
-
93
-
88
+
94
89
// Make an AJAX request to the new route
95
90
fetch ( '/api/total_engagement_chile' )
96
91
. then ( response => response . json ( ) )
103
98
engagementBar . style . width = ( Math . min ( data . total_engagement * 1000 , 100 ) ) . toFixed ( 2 ) + '%' ;
104
99
105
100
// Update the content of the percentage div
106
- var percentageDiv = document . querySelector ( '.d- flex.align-items-center ' ) ;
101
+ var percentageDiv = document . querySelector ( '.flex.justify-between > div[style*="filter: var(--legibilidad)"] ' ) ;
107
102
percentageDiv . textContent = ( Math . min ( data . total_engagement * 1000 , 100 ) ) . toFixed ( 2 ) + '%' ;
108
103
} ) ;
109
104
128
123
engagementBar . style . width = ( Math . min ( data . total_engagement * 1000 , 100 ) ) . toFixed ( 2 ) + '%' ;
129
124
130
125
// Update the content of the percentage div
131
- var percentageDiv = document . querySelector ( '.d- flex.align-items-center ' ) ;
126
+ var percentageDiv = document . querySelector ( '.flex.justify-between > div[style*="filter: var(--legibilidad)"] ' ) ;
132
127
percentageDiv . textContent = ( Math . min ( data . total_engagement * 1000 , 100 ) ) . toFixed ( 2 ) + '%' ;
133
128
} ) ;
134
129
You can’t perform that action at this time.
0 commit comments