Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue is on me #19

Open
Abdurahmanm2020 opened this issue Jul 25, 2020 · 2 comments
Open

issue is on me #19

Abdurahmanm2020 opened this issue Jul 25, 2020 · 2 comments

Comments

@Abdurahmanm2020
Copy link

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

@BaseMax
Copy link

BaseMax commented Jul 25, 2020

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,

@Abdurahmanm2020
Copy link
Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants