Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
fix: add evenelistener adding in another settimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitK-deriv committed Feb 29, 2024
1 parent 0a2c45c commit a7420c1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions static/live-price.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ setTimeout(() => {
document.getElementById(newHash).classList.add('active-tab')
}
var tabs = ['fx', 'der', 'etfs', 'stk', 'cry', 'com']
tabs.map((tabId) => {
document.getElementById(tabId).addEventListener('click', function () {
onTabChange(tabId)
setTimeout(() => {
tabs.map((tabId) => {
document.getElementById(tabId).addEventListener('click', function () {
onTabChange(tabId)
})
})
})
document.getElementById('#' + hash).classList.add('active-cards')
document.getElementById(hash).classList.add('active-tab')
document.getElementById('#' + hash).classList.add('active-cards')
document.getElementById(hash).classList.add('active-tab')
}, 500)

var upIcon = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
upIcon.setAttribute('width', '24')
Expand Down

0 comments on commit a7420c1

Please sign in to comment.