Yalantis / ToDoList

Micro-Transitions for Smooth Android To-Do List Animations
https://yalantis.com
1.65k stars 284 forks source link

issue is on me #19

Open Abdurahmanm2020 opened 4 years ago

Abdurahmanm2020 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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