jquery-simple-slider icon indicating copy to clipboard operation
jquery-simple-slider copied to clipboard

Width

Open Vivek44 opened this issue 12 years ago • 3 comments

How to set Width to the Input Slide..?

Vivek44 avatar Feb 26 '13 12:02 Vivek44

The simple-slider.css that comes with the script contains

.slider {
  width: 300px;
}

You can change or override that to fit your needs.

maartenvg avatar Apr 10 '13 23:04 maartenvg

I found a positioning problem with the script. If I changed the width of the dragger, it would move the vertical position higher than the track which was undesirable. Looking at the code I was able to do a simple fix.

line 63 : change from

  this.dragger.css({
    marginTop: this.dragger.outerWidth() / -2,
    marginLeft: this.dragger.outerWidth() / -2
  });

To

  this.dragger.css({
    marginTop: this.dragger.outerHeight() / -2,
    marginLeft: this.dragger.outerWidth() / -2
  });

so that the marginTop is referencing the objects Height rather than it's Width.

Seems to have fixed the issue.

ivus avatar Jun 27 '13 02:06 ivus

@ivus - Thanks! I ran into the same problem with the width issue you found. You might want to post it as a separate issue so that @loopj might fix it.

blueskysd avatar Dec 05 '13 22:12 blueskysd