Reputation: 6574
I created this JSbin, since I will need this nice slider for something I am creating. The bin can be found here http://jsbin.com/ipoloy/3/edit
Since this is my very FIRST time using MooTools not I'm quite sure how to write it, I copied what the documentation said just to see how it works first. Well it didn't, so then I wrapped it in a $(function() { });
still nothing. Do I need to add the jQuery 1.9 plus MooTools 1.4.5?
Any one with good information, please let me know so I can figure this out and get going on this slider.
Upvotes: 0
Views: 292
Reputation: 2073
Add mootools more and along with the mootools and it will work.
http://jsbin.com/egicem/1/edit
Add this below the mootools library:
<script src="http://cdnjs.cloudflare.com/ajax/libs/mootools-more/1.4.0.1/mootools-more-yui-compressed.js"></script>
its hosted on http://cdnjs.com/ website
Upvotes: 1
Reputation: 5253
You just need to add mootools more (Slider is in mootools more):
but I don't think "more" is in google apis so you need to build it in mootools site: http://mootools.net/more/
var slider = $('slider');
new Slider(slider, slider.getElement('.knob'), {
range: [9, 35],
initialStep: 14,
onChange: function(value){
if (value) $('fontSize').setStyle('font-size', value);
}
});
Upvotes: 1