Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    VoidVolker
    @VoidVolker
    also, it is better to cache slides.length to separate variable
    AnaCamelo
    @AnaCamelo
    so, how is that one of the slides is being showed?
    VoidVolker
    @VoidVolker
    add code to show selected slide?
    AnaCamelo
    @AnaCamelo
    well, the code is working great, but i don't understand why if that loop is hiding all the slides, how is one being displayed?
    VoidVolker
    @VoidVolker
    in this loop no one slide is being displayed
    AnaCamelo
    @AnaCamelo
    exactly, that's why I'm confused
    VoidVolker
    @VoidVolker
    check other code
    AnaCamelo
    @AnaCamelo
    Can i show you athe whole code?
    VoidVolker
    @VoidVolker
    this loop isnt the place for searching the displayed slide
    use ``` for code
    before and after
    AnaCamelo
    @AnaCamelo
    oohh ok, thanks! :)

    ' var slideIndex = 1;
    showSlides(slideIndex);

    function plusSlides(n) {
    showSlides(slideIndex += n);
    }

    function currentSlide(n) {
    showSlides(slideIndex = n);
    }

    function showSlides(n) {
    var i;
    var slides = document.getElementsByClassName("mySlides");
    var dots = document.getElementsByClassName("dot");
    if (n > slides.length) {slideIndex = 1}
    if (n < 1) {slideIndex = slides.length}
    for (i = 0; i < slides.length; i++) {
    slides[i].style.display = "none";
    }
    for (i = 0; i < dots.length; i++) {
    dots[i].className = dots[i].className.replace(" active", "");
    }
    slides[slideIndex-1].style.display = "block";
    dots[slideIndex-1].className += " active";
    }'

    single quotation mark for the code? it didn't seem to work
    VoidVolker
    @VoidVolker
    wrooong style! use ``` for code wrapping
    not single quotation, three apostrophe
    AnaCamelo
    @AnaCamelo
    k
    VoidVolker
    @VoidVolker
    @AnaCamelo edit your msg for correct style
    @AnaCamelo you can edit your msg, please don't flood
    AnaCamelo
    @AnaCamelo
    sorry, I'm trying
    VoidVolker
    @VoidVolker
    code isn't redable, fix style before for more redaible view
    AnaCamelo
    @AnaCamelo
    ok
    VoidVolker
    @VoidVolker
    var slideIndex = 1;
    showSlides(slideIndex);
    
    function plusSlides(n) {
        showSlides(slideIndex += n);
    }
    
    function currentSlide(n) {
        showSlides(slideIndex = n);
    }
    
    function showSlides(n) {
    
        var i;    
        var slides = document.getElementsByClassName("mySlides");
        var dots = document.getElementsByClassName("dot");
    
        if (n > slides.length) {slideIndex = 1}
        if (n < 1) {slideIndex = slides.length}
    
        for (i = 0; i < slides.length; i++) {
            slides[i].style.display = "none";
        }
    
        for (i = 0; i < dots.length; i++) {
            dots[i].className = dots[i].className.replace(" active", "");
        }
    
        slides[slideIndex-1].style.display = "block";
        dots[slideIndex-1].className += " active";
    }
    AnaCamelo
    @AnaCamelo
    I can't make it work :S
    VoidVolker
    @VoidVolker
    like this
    new line after ```
    AnaCamelo
    @AnaCamelo
    var slideIndex = 1;
    showSlides(slideIndex);
    
    function plusSlides(n) {
      showSlides(slideIndex += n);
    }
    
    function currentSlide(n) {
      showSlides(slideIndex = n);
    }
    
    function showSlides(n) {
      var i;
      var slides = document.getElementsByClassName("mySlides");
      var dots = document.getElementsByClassName("dot");
      if (n > slides.length) {slideIndex = 1} 
      if (n < 1) {slideIndex = slides.length}
      for (i = 0; i < slides.length; i++) {
          slides[i].style.display = "none"; 
      }
      for (i = 0; i < dots.length; i++) {
          dots[i].className = dots[i].className.replace(" active", "");
      }
      slides[slideIndex-1].style.display = "block"; 
      dots[slideIndex-1].className += " active";
    }
    there you go! :)
    thank you!
    VoidVolker
    @VoidVolker
    cool ) grac :+1:
    check the string slides[slideIndex-1].style.display = "block";
    @AnaCamelo
    this is what you are lokking for
    AnaCamelo
    @AnaCamelo
    The script i have is working well, i just want to understand it
    VoidVolker
    @VoidVolker
    goog, so, this string is show current slide
    AnaCamelo
    @AnaCamelo
    oohhh ok.. i think i get it
    thanks a lot @VoidVolker
    mohamadabab
    @mohamadabab
    hello
    any one can help me
    VoidVolker
    @VoidVolker
    just asq
    mohamadabab
    @mohamadabab
    i have master project and i want to programme a web template in this web anyone can create your simple mobile application like this web http://www.appsgeyser.com
    my questions is how i start
    satrapes
    @satrapes
    can anyone help me understand a few key details on asynchronous communication between host and embedded device over USB?
    satrapes
    @satrapes
    ...
    EligijusB
    @EligijusB
    Hey guys, I am new here, having some problems with Selenium in Java using HTMLUnitDriver. Can anyone help?
    AnaCamelo
    @AnaCamelo
    Hello! I've been working with mamp for a while, but lately it seems to be keeping the cache and this is killing me. What i've had to do so far is working all the front-end first and then, blindly do the back end to test it on real server at the end. Does any one know about this bug or how to fix it? Or even if paying for the pro version this will stop happening? Thanks! :D
    Otar Dvalishvili
    @sparrowC2
    I need help with Filter lock in java threads ,please :)
    Raghu Raj Rai
    @Raidestro
    Just a thought provoking question,
    What is the weirdest way in which you can sum 100 elements in an array ?
    AnaCamelo
    @AnaCamelo
    Hello! I'm using this example (https://www.w3schools.com/howto/howto_css_modals.asp ) for generating a quick view of products, but it works only for the first product. Could anyone explain me what can I do to make it work for all of them? do I need a loop or something like that?