Does Meteor support “jQuery Nice Scroll” lib?
I wrapped jQuery code into
Template..rendered = function(){}
as other jQuery files (for example, popups). The same code works fine when I’m running it with Node.js. Also I installed these packages : mizzao:jquery-ui , jquery (was installed by default).
1 Like
You might want to use the jackyqiu:meteor-jquery-nicescroll package instead of integrating it yourself.
1 Like
Do you have sort of examples showing how to use this package? As I see in sources of package - it just download jQuery package for meteor application - I’ve already made this step by myself.
You can build an example pretty quickly:
a) meteor create nicescroll-example
b) meteor add jquery
c) meteor add jackyqiu:meteor-jquery-nicescroll
d) Replace nicescroll-example.html with something like:
<head>
<title>nicescroll</title>
</head>
<body>
<h1>Nicescroll Example</h1>
<div id="example1">
... add in lines and lines of text ..
</div>
</body>
e) Replace nicescroll-example.js with something like:
if (Meteor.isClient) {
Template.body.onRendered(function () {
$('#example1').niceScroll();
});
}
f) Replace nicescroll-example.css with something like:
#example1 {
overflow: hidden;
height: 300px;
}
2 Likes