ToDoList icon indicating copy to clipboard operation
ToDoList copied to clipboard

issue is on me

Open Abdurahmanm2020 opened this issue 4 years ago • 2 comments

HI I am abdur rahman i need help to please

I have made a to do list and a close button but I do not use the fade out I used js code

`  
var myNodelist = document.getElementsByClassName("item");
var i;
for (i = 0; i < myNodelist.length; i++) {
  var span = document.createElement("SPAN");
  var txt = document.createTextNode("");
  span.className = "close";
  span.appendChild(txt);
  myNodelist[i].appendChild(span);
}
the issues is when I close one and make a new new they all come back


this.parentElement.style.display = 'none';
var close = document.getElementsByClassName("close");
var i;
for (i = 0; i < close.length; i++) {
  close[i].onclick = function() {
    var div = this.parentElement;
    div.style.display = "none";
  }
}

image

now I close it image

and when I make another one this is what happens image they all come back

@oluwaseunasuni @AnneLivia @juliatotta @Anteste @Abbas @Abbazz2020 @iam-abbas @neodigm @MatheusWilliam31 @BaseMax @Obizim @iamfortune @timo-cmd @JoneBulande @payperlez @IzabellaRibeiro

Abdurahmanm2020 avatar Jul 25 '20 12:07 Abdurahmanm2020

Hi abdur, @Abdurahmanm2020 It takes time to check this. Can you share the complete source code? Also HTML. What exactly is the problem? And what did you expect? Best,

BaseMax avatar Jul 25 '20 12:07 BaseMax

@BaseMax ther is no html code it all js code so the button is fully js and css

but here is the html code

<div class="item">
<input type="checkbox" name="fordCheckBox" id="Ford" value="Ford">
                    <label for="Ford"></label>
					<p><%= newListItems[i] %></p>
				</div>

in the js code it say

var myNodelist = document.getElementsByClassName("item");

then say

var span = document.createElement("SPAN");

some it make the html code for the button is a span you sould take another look at the js code for some thing

I can not send you the link for the web right now cus I am having problems with my computer

but when I can a will tell me if ther is any thin else you want

Abdurahmanm2020 avatar Jul 26 '20 06:07 Abdurahmanm2020