Reader small image

You're reading from  Bootstrap 4 Cookbook

Product typeBook
Published inJun 2017
Reading LevelBeginner
PublisherPackt
ISBN-139781785889295
Edition1st Edition
Languages
Right arrow
Author (1)
Ajdin Imsirovic
Ajdin Imsirovic
author image
Ajdin Imsirovic

Ajdin Imsirovic is a full-stack web developer who has published several courses on the subject of web design and web development. He has also authored three books, Bootstrap 4 Cookbook, Elm Web Development, and Vue.js Quick Start Guide. In his fourth book, Vue CLI 3 Quick Start Guide, he introduces readers to the rich ecosystem of frontend tooling and best practices.
Read more about Ajdin Imsirovic

Right arrow

Adding input sliders with Rangeslider.js


At the time of publishing this book, there were only several jQuery plugins specifically intended for Bootstrap 4. However, since jQuery is a stable JavaScript library with a long history, there have been plenty of plugins already made for it. One of those is Rangeslider.js, available at http://rangeslider.js.org/.

Although not intended for Bootstrap 4 per se, it is still a great polyfill for the input HTML element's range type attribute. Bootstrap 4 does not come with its own implementation of the range type attribute, so this polyfill is a great solution.

Getting ready

To see the Rangeslider.js files available for use with CDNJS, navigate to https://cdnjs.com/libraries/rangeslider.js. Also, to get acquainted with the Rangeslider.js polyfill, visit http://rangeslider.js.org/ and the GitHub repository at https://github.com/andreruffert/rangeslider.js.

How to do it…

  1. Reference the CSS file from CDNJS and add it inside the head tag of app/_layout.ejs:
<...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Bootstrap 4 Cookbook
Published in: Jun 2017Publisher: PacktISBN-13: 9781785889295

Author (1)

author image
Ajdin Imsirovic

Ajdin Imsirovic is a full-stack web developer who has published several courses on the subject of web design and web development. He has also authored three books, Bootstrap 4 Cookbook, Elm Web Development, and Vue.js Quick Start Guide. In his fourth book, Vue CLI 3 Quick Start Guide, he introduces readers to the rich ecosystem of frontend tooling and best practices.
Read more about Ajdin Imsirovic