I have a problem with Bootstrap 3.0
and NiceScroll 3.5.0
. These two plugins both require jQuery, however Bootstrap.js requires jQuery 1.9.1
or higher and NiceScroll is not working with this version. Now I'm using jQuery 2.1.3
. What should I do so I can use both Bootstrap and NiceScroll?
Asked
Active
Viewed 1,841 times
3

Siguza
- 21,155
- 6
- 52
- 89

Attila Nagy
- 55
- 7
-
Does NiceScroll work with any version above `1.9.1`? Because I cannot imagine this is causing the issue for you. – Kevin Dec 30 '14 at 13:44
-
Hope you don't have to support older versions of IE (since jQ 2.x kills
– Brad Christie Dec 30 '14 at 14:02
2 Answers
3
On NiceScroll's GitHub page you can find version 3.6.0 that is quite more recent than the other and works with jQuery 1.8.3+ : https://github.com/inuyaksa/jquery.nicescroll

A. Rama
- 903
- 8
- 18
2
or you may consider the $.noConflict()
just have to load the plugins in correct sequence. In your case, v2.1.3 is your main version, so load it first. then load the v1.9.1, and then bootstrap,
after that call the jQuery.noConflict, you will have the $ pointed back to the v2.1.3
<script src="//code.jquery.com/jquery-2.1.3.js"></script>
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script>
jQuery.noConflict( true );
</script>

ChinKang
- 4,212
- 2
- 17
- 29