jQuery Scroller
Scroller for jQuery and jQuery Mobile
Scroller for jQuery and jQuery Mobile
Scroller for jQuery and jQuery Mobile
Scroller - Price Range
$(function () {
var fromValues = [],
toValues = [];
for (var i = 0; i <= 1000; i += 20) {
fromValues.push({
display: '$' + i,
value: i
});
}
toValues = fromValues.slice();
toValues.shift();
toValues.push({
display: 'over $1000'
});
$('#demo').mobiscroll().scroller({
theme: '',
lang: '',
width: 150,
wheels: [
[{
circular: false,
data: fromValues,
label: 'From'
}, {
circular: false,
data: toValues,
label: 'To'
}]
],
showLabel: true,
minWidth: 130,
cssClass: 'md-pricerange',
validate: function (event, inst) {
var i,
values = event.values,
disabledValues = [];
for (i = 0; i < toValues.length; ++i) {
if (toValues[i].value <= values[0]) {
disabledValues.push(toValues[i].value);
}
}
return {
disabled: [
[], disabledValues
]
}
},
formatValue: function (data) {
return '$' + data[0] + ' - $' + data[1];
},
parseValue: function (valueText) {
if (valueText) {
return valueText.replace(/\s/gi, '').split('-');
}
return [0, 20];
}
});
});
<input id="demo" placeholder="Please Select..." />
Scroller - Custom Units
$(function () {
var units = ['oz', 'g', 'serving'],
prevUnit = 'oz',
wheel = [
[{
circular: false,
data: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]
}, {
circular: false,
data: ['-', '1/4', '1/2', '3/4']
}, {
circular: false,
data: units
}]
];
$('#demo').mobiscroll().scroller({
theme: '',
lang: '',
wheels: wheel,
validate: function (event, inst) {
var i,
mult = 1,
index = event.index,
currUnit = event.values[2],
disabled = [];
if (currUnit == 'g' && (prevUnit == 'oz' || prevUnit == 'serving')) {
mult = 28;
} else if ((currUnit != 'oz' || currUnit != 'serving') && prevUnit == 'g') {
mult = 1 / 28;
}
if (currUnit != 'serving') {
disabled.push('1/4', '1/2', '3/4');
}
if (index == 2 && currUnit != prevUnit) {
for (i = 0; i < wheel[0][0].data.length; ++i) {
wheel[0][0].data[i] = Math.round(wheel[0][0].data[i] * mult);
}
inst.settings.wheels = wheel;
inst._tempWheelArray[0] = inst._tempWheelArray[0] * mult;
inst.changeWheel({
0: wheel[0][0]
});
prevUnit = currUnit;
}
return {
disabled: [
[], disabled, []
]
}
},
parseValue: function (val) {
var hasUnit;
if (val) {
val = val.toString().split(' ');
hasUnit = units.indexOf(val[1]) !== -1;
return [val[0], (hasUnit ? '' : val[1].replace('-', '')), (hasUnit ? val[1] : val[2])];
}
return [0, '-', 'oz'];
},
formatValue: function (data) {
return (data[2] == 'serving' && data[0] == 0 && data[1] ? '' : data[0]) + (data[1] ? ' ' + data[1].replace('-', '') : '') + ' ' + data[2];
}
});
});
<input id="demo" placeholder="Please Select ..." />
Scroller - Date range
$(function () {
var fromValues = ['Before 1960', 1970, 1980, 1990, 1995, 2000, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015],
toValues = [1970, 1980, 1990, 1995, 2000, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016];
$('#demo').mobiscroll().scroller({
theme: '',
lang: '',
rows: 13,
wheels: [
[{
circular: false,
data: fromValues,
label: 'From'
}, {
circular: false,
data: toValues,
label: 'To'
}]
],
showLabel: true,
minWidth: 130,
cssClass: 'md-daterange',
validate: function (event, inst) {
var i,
values = event.values,
disabledValues = [];
for (i = 0; i < toValues.length; ++i) {
if (toValues[i] <= values[0]) {
disabledValues.push(toValues[i]);
}
}
return {
disabled: [
[], disabledValues
]
}
},
formatValue: function (data) {
return data[0] + ' - ' + data[1];
},
parseValue: function (valueText) {
if (valueText) {
return valueText.replace(/\s/gi, '').split('-');
}
return [1990, 2010];
}
});
});
<input id="demo" placeholder="Please Select..." />
Scroller - Event handlers
EVENTS FIRED:
$(function () {
$('#demo').mobiscroll().scroller({
theme: '',
lang: '',
onInit: function (event, inst) {
// Your custom event handler goes here
},
onMarkupReady: function (event, inst) {
// Your custom event handler goes here
},
onBeforeShow: function (event, inst) {
// Your custom event handler goes here
},
onPosition: function (event, inst) {
// Your custom event handler goes here
},
onShow: function (event, inst) {
// Your custom event handler goes here
},
onSet: function (event, inst) {
// Your custom event handler goes here
},
onItemTap: function (event, inst) {
// Your custom event handler goes here
},
onDestroy: function (event, inst) {
// Your custom event handler goes here
},
onClose: function (event, inst) {
// Your custom event handler goes here
},
onCancel: function (event, inst) {
// Your custom event handler goes here
},
onBeforeClose: function (event, inst) {
// Your custom event handler goes here
},
onClear: function (event, inst) {
// Your custom event handler goes here
},
onChange: function (event, inst) {
// Your custom event handler goes here
},
validate: function (data, inst) {
// Your custom event handler goes here
},
wheels: [
[{
data: ['0', '1', '2', '3', '4', '5', '6', '7']
}, {
data: [{
value: 0,
display: 'a'
}, {
value: 1,
display: 'b'
}, {
value: 2,
display: 'c'
}, {
value: 3,
display: 'd'
}]
}]
]
});
});
<input id="demo" placeholder="Please Select..." />
Scroller - Display modes
mobiscroll.settings = {
lang: '',
theme: ''
};
$(function () {
$('#demo-bottom').mobiscroll().scroller({
display: 'bottom',
wheels: [
[{
label: 'First wheel',
data: ['0', '1', '2', '3', '4', '5', '6', '7']
}, {
label: 'Second wheel',
data: [{
value: 0,
display: 'a'
}, {
value: 1,
display: 'b'
}, {
value: 2,
display: 'c'
}, {
value: 3,
display: 'd'
}]
}]
]
});
$('#demo-top').mobiscroll().scroller({
display: 'top',
wheels: [
[{
label: 'First wheel',
data: ['0', '1', '2', '3', '4', '5', '6', '7']
}, {
label: 'Second wheel',
data: [{
value: 0,
display: 'a'
}, {
value: 1,
display: 'b'
}, {
value: 2,
display: 'c'
}, {
value: 3,
display: 'd'
}]
}]
]
});
$('#demo-center').mobiscroll().scroller({
display: 'center',
wheels: [
[{
label: 'First wheel',
data: ['0', '1', '2', '3', '4', '5', '6', '7']
}, {
label: 'Second wheel',
data: [{
value: 0,
display: 'a'
}, {
value: 1,
display: 'b'
}, {
value: 2,
display: 'c'
}, {
value: 3,
display: 'd'
}]
}]
]
});
$('#demo-bubble').mobiscroll().scroller({
display: 'bubble',
wheels: [
[{
label: 'First wheel',
data: ['0', '1', '2', '3', '4', '5', '6', '7']
}, {
label: 'Second wheel',
data: [{
value: 0,
display: 'a'
}, {
value: 1,
display: 'b'
}, {
value: 2,
display: 'c'
}, {
value: 3,
display: 'd'
}]
}]
]
});
$('#demo-inline').mobiscroll().scroller({
display: 'inline',
layout: 'liquid',
wheels: [
[{
label: 'First wheel',
data: ['0', '1', '2', '3', '4', '5', '6', '7']
}, {
label: 'Second wheel',
data: [{
value: 0,
display: 'a'
}, {
value: 1,
display: 'b'
}, {
value: 2,
display: 'c'
}, {
value: 3,
display: 'd'
}]
}]
]
});
});
<div mbsc-form>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Try different display modes</div>
<label>
Bottom
<input id="demo-bottom" placeholder="Please Select..." />
</label>
<label>
Top
<input id="demo-top" type="text" placeholder="Please Select..." />
</label>
<label>
Center
<input id="demo-center" type="text" placeholder="Please Select..." />
</label>
<label>
Bubble
<input id="demo-bubble" type="text" placeholder="Please Select..." />
</label>
</div>
<div class="mbsc-form-group mbsc-padding">
<p class="mbsc-thin">With inline display you can embed the Scroller component in almost any markup or form.</p>
</div>
<div class="mbsc-form-group">
<div class="mbsc-form-group-title">Embedded scroller picker</div>
<div id="demo-inline"></div>
</div>
</div>
Scroller - Desktop
mobiscroll.settings = {
lang: '',
theme: ''
};
$(function () {
var wheelData = [
[{
data: ['0', '1', '2', '3', '4', '5', '6', '7']
}, {
data: [{
value: 0,
display: 'a'
}, {
value: 1,
display: 'b'
}, {
value: 2,
display: 'c'
}, {
value: 3,
display: 'd'
}]
}]
];
$('#demo-top').mobiscroll().scroller({
display: 'top',
touchUi: false,
wheels: wheelData
});
$('#demo-bottom').mobiscroll().scroller({
display: 'bottom',
touchUi: false,
wheels: wheelData
});
$('#demo-anchored').mobiscroll().scroller({
touchUi: false,
wheels: wheelData
});
$('#demo-center').mobiscroll().scroller({
display: 'center',
touchUi: false,
wheels: wheelData
});
$('#demo-set').mobiscroll().scroller({
display: 'center',
touchUi: false,
wheels: wheelData,
buttons: ['set']
});
$('#demo-set-cancel').mobiscroll().scroller({
display: 'center',
touchUi: false,
wheels: wheelData,
buttons: ['set', 'cancel']
});
});
<div mbsc-form>
<div class="mbsc-align-center">
<div class="mbsc-note mbsc-note-primary">Scroller component can be used on mobile and desktop. See desktop functionality below.</div>
</div>
<div class="mbsc-grid">
<div class="mbsc-row mbsc-justify-content-center">
<div class="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-xl-5">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">Pop-up positioning</div>
<label>
Top
<input id="demo-top" placeholder="Please Select..." />
</label>
<label>
Bottom
<input id="demo-bottom" placeholder="Please Select..." />
</label>
<label>
Anchored
<input id="demo-anchored" placeholder="Please Select..." />
</label>
<label>
Center
<input id="demo-center" placeholder="Please Select..." />
</label>
</div>
</div>
</div>
<div class="mbsc-row mbsc-justify-content-center">
<div class="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-xl-5">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">With buttons</div>
<label>
Set button
<input id="demo-set" placeholder="Please Select..." />
</label>
<label>
Set/Cancel
<input id="demo-set-cancel" placeholder="Please Select..." />
</label>
</div>
</div>
</div>
</div>
</div>
Scroller - Theming capabilities
mobiscroll.settings = {
theme: '',
lang: ''
};
$(function () {
var wheelData = [
[{
data: ['0', '1', '2', '3', '4', '5', '6', '7']
}, {
data: [{
value: 0,
display: 'a'
}, {
value: 1,
display: 'b'
}, {
value: 2,
display: 'c'
}, {
value: 3,
display: 'd'
}]
}]
];
$('#demo-ios').mobiscroll().scroller({
theme: 'ios',
display: 'center',
touchUi: false,
wheels: wheelData
});
$('#demo-ios-dark').mobiscroll().scroller({
theme: 'ios-dark',
display: 'center',
touchUi: false,
wheels: wheelData
});
$('#demo-material').mobiscroll().scroller({
theme: 'material',
display: 'center',
touchUi: false,
wheels: wheelData
});
$('#demo-material-dark').mobiscroll().scroller({
theme: 'material-dark',
display: 'center',
touchUi: false,
wheels: wheelData
});
$('#demo-windows').mobiscroll().scroller({
theme: 'windows',
display: 'center',
touchUi: false,
wheels: wheelData
});
$('#demo-windows-dark').mobiscroll().scroller({
theme: 'windows-dark',
display: 'center',
touchUi: false,
wheels: wheelData
});
$('#demo-mobiscroll').mobiscroll().scroller({
theme: 'mobiscroll',
display: 'center',
touchUi: false,
wheels: wheelData
});
$('#demo-mobiscroll-dark').mobiscroll().scroller({
theme: 'mobiscroll-dark',
display: 'center',
touchUi: false,
wheels: wheelData
});
});
<div mbsc-form>
<div class="mbsc-align-center">
<div class="mbsc-note mbsc-note-primary">Use it with any of the base themes: iOS, Android Material, Windows or Mobiscroll.</div>
</div>
<div class="mbsc-grid-fixed mbsc-grid-lg">
<div class="mbsc-row">
<div class="mbsc-col">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">iOS Theme</div>
<label>
Light
<input id="demo-ios" placeholder="Please Select..." />
</label>
<label>
Dark
<input id="demo-ios-dark" placeholder="Please Select..." />
</label>
</div>
</div>
<div class="mbsc-col">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">Material Theme</div>
<label>
Light
<input id="demo-material" placeholder="Please Select..." />
</label>
<label>
Dark
<input id="demo-material-dark" placeholder="Please Select..." />
</label>
</div>
</div>
</div>
<div class="mbsc-row">
<div class="mbsc-col">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">Windows Theme</div>
<label>
Light
<input id="demo-windows" placeholder="Please Select..." />
</label>
<label>
Dark
<input id="demo-windows-dark" placeholder="Please Select..." />
</label>
</div>
</div>
<div class="mbsc-col">
<div class="mbsc-form-group-inset">
<div class="mbsc-form-group-title">Mobiscroll Theme</div>
<label>
Light
<input id="demo-mobiscroll" placeholder="Please Select..." />
</label>
<label>
Dark
<input id="demo-mobiscroll-dark" placeholder="Please Select..." />
</label>
</div>
</div>
</div>
</div>
</div>
Looking for something you didn't see or have a sales question?
Ask us about it, we're here to help.
Component license
Purchase component licenses if you are looking for specific funcionality.
All
Framework license
Get all 36 components, including
Framework license
Get all 36 components, including
- Use it when building with plain and simple JS
- Compatible with vanilla JS app or frameworks like Vue
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with jQuery and jQuery Mobile
- Enjoy the familiar API if you already use jQuery
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular JS and Ionic 1
- For web and mobile apps based on Angular 1.x
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular 2/4/5/6/7 and Ionic 2/3/4
- Visual Studio and VS Code integration
- Royalty-free commercial usage
- Technical support is included with the license
- Use it when building with React JS
- Collection of UI components for web and mobile
- Royalty-free commercial usage
- Technical support is included with the license
Framework license
Select the development framework you are using. Get all 36 components with the license.
- Use it when building with plain and simple JS
- Compatible with vanilla JS app or frameworks like Vue
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with jQuery and jQuery Mobile
- Enjoy the familiar API if you already use jQuery
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular JS and Ionic 1
- For web and mobile apps based on Angular 1.x
- Royalty-free commercial usage
- Technical support is included with the license
- Use it with Angular 2/4/5/6/7 and Ionic 2/3/4
- Visual Studio and VS Code integration
- Royalty-free commercial usage
- Technical support is included with the license
- Use it when building with React JS
- Collection of UI components for web and mobile
- Royalty-free commercial usage
- Technical support is included with the license
Select the framework you are interested in
Use Javascript when building with plain and simple JS.
Use jQuery when you have jQuery already included or if you are building with jQuery Mobile.
Use AngularJS when building with Angular 1.x or Ionic 1.
Use Angular when building with Angular 2/4/5/6/7 or Ionic 2/3/4.
Use it when you are building your app or website with React.
Do you need additional support seats?
The framework license comes with one support seat. ( +$50/seat )
Add the source code?
What framework are you using?
We have to set you up with a trial for this to run 👍
What framework are you using?
Step 1.Install the Mobiscroll CLI from npm
$ npm install -g @mobiscroll/cli
The CLI makes configuring your apps super simple 👍
Step 2.Run the following command in the root folder of your Ionic project
$ mobiscroll config ionic
$ mobiscroll config ionic --lite
You will be prompted to log in with your mobiscroll account. Set your password here
Create an Ionic 3 & Mobiscroll starter with the CLI:
Run this command for Ionic 4 & Mobiscroll starter:
Extract the zip file and run the project like any Ionic app. Make sure to have Ionic CLI installed and open the terminal in the app root folder.
$ npm install
$ ionic serve
Let us know if we can help and enjoy!
Your password has been changed!
Everything is set up so that you can dig in right away and start exploring.
We have set up a trial so that you can try the demos locally.
Extract the zip file and open the demo in your favorite browser.
To install Mobiscroll in your project
follow instructions from this page.
Let us know if we can help and enjoy! 👍
Please extract the zip file and run the project like any Angular CLI app.
Make sure to have the Angular CLI installed.
For installation and usage, extract the zip file and open a terminal window and follow these steps.
$ npm install
$ ng serve --open
Let us know if we can help and enjoy! 👍
Everything is set up so that you can dig in right away and start exploring.
We have set up a trial so that you can try the demos locally.
The easiest way to get started is to follow the installation steps and by
grabbing the code directly from the demo page. Let us know if we can help and enjoy!
You'll find a fully functional Kitchen-sink Ionic app in the zip file.
Everything is set up so that you can dig in right away and start exploring.
We have set up a trial so that you can try the demos locally.
The demos are using Babel's in-browser ES6 and JSX transformer.
Extract the zip file and open the demo in your browser. To install Mobiscroll in your project
follow instructions from this page.
Let us know if we can help and enjoy! 👍