Skip to content

issue is on me #19

@Abdurahmanm2020

Description

@Abdurahmanm2020

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions