jmona789
jmona789

Reputation: 2839

Bootstrap slider is not visable

I am trying to use this bootstrap slider on a site I'm developing and its not displaying at all: slinder I created a plunker here to demonstrate the issue: Plunker Does anyone know how to fix this?

<html>
  <head>
    <link rel="stylesheet" href="style.css">
  </head>

  <body>
    <h1>Hello Plunker!</h1>
    <input id="ex1" data-slider-id='ex1Slider' type="text" data-slider-min="0" data-slider-max="20" data-slider-step="1" data-slider-value="14"/>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/9.2.0/bootstrap-slider.js"></script>
    <script src="script.js"></script>
  </body> 
</html>

css

#ex1Slider .slider-selection {
    background: #BABABA;
}

JavaScript:

var slider = new Slider('#ex1', {
    formatter: function(value) {
        return 'Current value: ' + value;
    }
});

Upvotes: 0

Views: 46

Answers (1)

Brian
Brian

Reputation: 1893

You also need the stylesheet that comes with the package. Add this to your head tag:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/9.2.0/css/bootstrap-slider.css" />

Upvotes: 1

Related Questions