Giter Club home page Giter Club logo

Comments (14)

Djules avatar Djules commented on May 24, 2024 2

I've extended the $$ helper function in order to query within a given container instead of the entire DOM, and fixed the OP issue as well.

from wallop.

peduarte avatar peduarte commented on May 24, 2024

Hey, that's interesting, I will look into it and get back to you.
Thanks

from wallop.

peduarte avatar peduarte commented on May 24, 2024

I cannot seem to replicate your issue.
I've created this Pen to test it out: http://codepen.io/peduarte/pen/gaoEXz

Can you show me how you're getting this problem?

from wallop.

peduarte avatar peduarte commented on May 24, 2024

Closing as I am unable to replicate your issue, feel free to re open or ask any questions.

from wallop.

curdin avatar curdin commented on May 24, 2024

@peduarte Apologies - i was away from a computer for a couple of days. I've updated the codepen to demostrate the issue. If you click the Advance both button you'll see that the left one fails to use a transition.
http://codepen.io/anon/pen/xwYLNJ

from wallop.

curdin avatar curdin commented on May 24, 2024

(I seem to be unable to reopen this issue)

from wallop.

peduarte avatar peduarte commented on May 24, 2024

Wow, amazing find!
Will look into it

from wallop.

afmarchetti avatar afmarchetti commented on May 24, 2024

Hi guys Did you solve the issue? I have to slider with autoplay and the animations doesn't work properly

from wallop.

xaddict avatar xaddict commented on May 24, 2024

I found this issue too when using the autoplay example but changing it to autoplay 2 sliders. The classes 'hideprevious' and 'shownext' get added to only 1 of the sliders, not all.

from wallop.

peduarte avatar peduarte commented on May 24, 2024

Hey guys, so sorry for the delay on this. I promise I'll look into it as soon as I can. πŸ™

from wallop.

benjaminpkane-zz avatar benjaminpkane-zz commented on May 24, 2024

Here

  // Reset all settings by removing classes and attributes added by goTo() & updateButtonStates()
  WS.removeAllHelperSettings = function () {
    removeClass(this.allItemsArray[this.currentItemIndex], this.options.currentItemClass);
    removeClass($$(this.options.hidePreviousClass)[0], this.options.hidePreviousClass);
    removeClass($$(this.options.hideNextClass)[0], this.options.hideNextClass);
    removeClass($$(this.options.showPreviousClass)[0], this.options.showPreviousClass);
    removeClass($$(this.options.showNextClass)[0], this.options.showNextClass);

    if (!this.buttonPrevious && !this.buttonNext) { return; }

    this.buttonPrevious.removeAttribute('disabled');
    this.buttonNext.removeAttribute('disabled');
  };

and here

  // Helper functions
  function $$(element) {
    if (!element) { return; }
    return document.querySelectorAll('.' + element);
  }

$$ is taking element, but it's just a string of a css class. The if statement in $$ is pointless.

document.querySelectorAll is querying the entire DOM. Also, it will always return an array, empty or not. 0 indexing an empty array returns null.

removeAllHelperSettings is basically just going to town on any DOM element with those classes.

from wallop.

peduarte avatar peduarte commented on May 24, 2024

@Djules Thanks, I'll take a look at the PR. What's the OP issue?

from wallop.

Djules avatar Djules commented on May 24, 2024

OP stands for Original Poster, @curdin in this case :)

from wallop.

peduarte avatar peduarte commented on May 24, 2024

@Djules Ahhh ok! πŸ‘

from wallop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.