i need help to get the id "${coin.id.toUpperCase()}" from toggle button bootstrap to make an array of checked id:
in javascript using append:
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" id="${coin.id.toUpperCase()}">
<label class="custom-control-label" for="${coin.id.toUpperCase()}"></label></div>
$(document).on("click", "input[type=checkbox]", function () {
if ((this).checked === true) {currenciesArr.push($(this).parent().get(0).id);
graphCurrencies.push($(this).parent().get(0).firstChild.innerText);}
i got undefined. something wrong with getting the id .thank you
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment