automatically add onclick functions to newly added stock crypto li items
This commit is contained in:
parent
73a3220fb8
commit
a627bf7f21
@ -929,7 +929,13 @@ allFeaturesTextAddBtn.map((value, index) => {
|
||||
var tag = document.createElement("li");
|
||||
if (index == 2) {
|
||||
tag.innerHTML= document.getElementById("base-select").value + ',' + document.getElementById("quote-select").value;
|
||||
} else{
|
||||
} else if (index == 0) {
|
||||
tag.innerHTML = allFeaturesText[index].value;
|
||||
tag.setAttribute("onclick", "getStockSymbol(this.innerText)");
|
||||
} else if (index == 1) {
|
||||
tag.innerHTML = allFeaturesText[index].value;
|
||||
tag.setAttribute("onclick", "getCryptoSymbol(this.innerText)");
|
||||
} else {
|
||||
tag.innerHTML = allFeaturesText[index].value;
|
||||
}
|
||||
allFeatures[index].appendChild(tag);
|
||||
|
Loading…
Reference in New Issue
Block a user