IonDen / ion.rangeSlider

jQuery only range slider
http://ionden.com/a/plugins/ion.rangeSlider/en.html
MIT License
2.56k stars 508 forks source link

add grid_sacle option #624

Open huijiewei opened 5 years ago

IonDen commented 5 years ago

Hi, description? Demo?

huijiewei commented 5 years ago

Hi, description? Demo?

Sorry for my english, grid_scale means custom label show. code is very simple:

            if (this.options.grid_scale.length > 0) {
                for (i = 0; i < num; i++) {
                    label = this.$cache.grid_labels[i][0];
                    var scale = $(label).html();

                     var inArray = false;

                     $.each(this.options.grid_scale, function () {
                        if (this == scale) {
                            inArray = true;
                            return false;
                        }
                    });

                     if (inArray) {
                        label.style.visibility = "visible";
                    } else {
                        label.style.visibility = "hidden";
                    }
                }
            } else {
                this.calcGridCollision(2, start, finish);
                this.calcGridCollision(4, start, finish);
            }