automatically add onclick functions to newly added stock crypto li items
This commit is contained in:
@@ -929,7 +929,13 @@ allFeaturesTextAddBtn.map((value, index) => {
|
|||||||
var tag = document.createElement("li");
|
var tag = document.createElement("li");
|
||||||
if (index == 2) {
|
if (index == 2) {
|
||||||
tag.innerHTML= document.getElementById("base-select").value + ',' + document.getElementById("quote-select").value;
|
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;
|
tag.innerHTML = allFeaturesText[index].value;
|
||||||
}
|
}
|
||||||
allFeatures[index].appendChild(tag);
|
allFeatures[index].appendChild(tag);
|
||||||
|
Reference in New Issue
Block a user