GithubHelp home page GithubHelp logo

Multiple sliders about slidr HOT 5 CLOSED

bchanx avatar bchanx commented on May 11, 2024
Multiple sliders

from slidr.

Comments (5)

bchanx avatar bchanx commented on May 11, 2024

Hey @slarcher,

The statistic sliders are both working for me, what seems to be the issue you're experiencing?
If the question is refering to IE8, it seems you're using the old v0.1.0. Update to v0.2.0 for IE8 support.

from slidr.

slarcher avatar slarcher commented on May 11, 2024

Hi Brian. No worries I fixed it. I screwed up v and h var and the slider stopped. All good.

Sent from my iPhone

On 19 Nov 2013, at 7:56 pm, Brian Chan [email protected] wrote:

Hey @slarcher,

The statistic sliders are both working for me, what seems to be the issue you're experiencing?
If the question is refering to IE8, it seems you're using the old v0.1.0. Update to v0.2.0 for IE8 support.


Reply to this email directly or view it on GitHub.

from slidr.

bchanx avatar bchanx commented on May 11, 2024

Good to hear!

from slidr.

lewismcarey avatar lewismcarey commented on May 11, 2024

Activate multiple slidrs by classname not id.

via jQuery:

$('.is-slidr').each( function() {

  var str = $(this).attr('id');
  var res = str.replace("#", "");
  var s = slidr.create( res ).start();

});

from slidr.

lewismcarey avatar lewismcarey commented on May 11, 2024

via Javascript

// array by classname 
// http://stackoverflow.com/questions/1933602/how-to-getelementbyclass-instead-of-getelementbyid-with-javascript#answer-1933623
function getElementsByClassName(node,classname) {
    if (node.getElementsByClassName) { // use native implementation if available
        return node.getElementsByClassName(classname);
    } else {
        return (function getElementsByClass(searchClass,node) {
            if ( node == null )
            node = document;
            var classElements = [],
            els = node.getElementsByTagName("*"),
            elsLen = els.length,
            pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)"), i, j;
            for (i = 0, j = 0; i < elsLen; i++) {
                if ( pattern.test(els[i].className) ) {
                    classElements[j] = els[i];
                    j++;
                }
            }
             return classElements;
        })(classname, node);
    }
}

// allows multiple slidrs by class
var elements = getElementsByClassName(document, 'is-slidr');
var n = elements.length;
for (var i = 0; i < n; i++) {
    var e = elements[i].id;
    var s = slidr.create( e ).start();
}

from slidr.

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.