Comments (7)
I suppose you downloaded by selecting jQueryMobile as framework. That includes
an additional jQuery Mobile widget. In this case indeed you must include the
script after the Jquery Mobile scripts. The benefit of this is that you can use
it like this:
<input name="dob" id="dob" data-role="mobiscroll" data-options='{ "display":
"bottom", "animate": "slideup" }' />
If you don't want to load mobiscroll after jQuery Mobile, than download again
by selecting jQuery as framework. After that you can include the script before
jQuery Mobile (but after jQuery of course)
Original comment by [email protected]
on 28 Jan 2013 at 12:38
- Changed state: Invalid
from mobiscroll.
I'm afraid that still didn't work. Based on the solution on issue #55, I tried
with live() but it is recommended to use on(). I downloaded the two different
frameworks, jQuery and jQuery Mobile and tried also with and without the
example you gave above for the input tag,
I still have to reload the page. I have absolutely no idea what I'm doing
wrong. Below is the code I used with more explanation on how I did it. Thanks
for your help.
I tried this downloading the jQuery framework
<link rel="stylesheet"
href="//code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.css"
/>
<link rel="stylesheet" type="text/css"
href="css/mobiscroll.datetime-2.4.min.css" />
<script src="//code.jquery.com/jquery-1.8.3.min.js"></script>
<script>
$(document).on('pagecreate', function(){
$.mobile.listview.prototype.options.headerTheme = "a";
$.mobile.defaultDialogTransition = 'pop';
$.mobile.defaultPageTransition = 'flip';
$.mobile.selectmenu.prototype.options.nativeMenu = false;
// I tried with and without $.mobile.ajaxEnabled=false;
});
</script>
<script src="js/mobiscroll.datetime-2.4.min.js"></script><!-- jQuery framework
-->
<script>
$(document).on('pagecreate', function(){
$('#dob').mobiscroll().date({
theme: 'jqm',
display: 'bottom',
mode: 'scroller'
});
});
</script>
<script
src="//code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.js"></
script>
with
<fieldset>
<legend>Verify Your Age</legend>
<div data-role="fieldcontain">
<label for="dob">Date of Birth<span class="alert"> *</span></label>
<input name="dob" id="dob" /></div>
</fieldset>
I then tried this with the jQuery Mobile framework
<link rel="stylesheet"
href="//code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.css"
/>
<link rel="stylesheet" type="text/css"
href="css/mobiscroll.datetime-2.4.min.css" />
<script src="//code.jquery.com/jquery-1.8.3.min.js"></script>
<script>
$(document).on('pagecreate', function(){
$.mobile.listview.prototype.options.headerTheme = "a";
$.mobile.defaultDialogTransition = 'pop';
$.mobile.defaultPageTransition = 'flip';
$.mobile.selectmenu.prototype.options.nativeMenu = false;
// I tried with and without $.mobile.ajaxEnabled=false;
});
</script>
<script
src="//code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.js"></
script>
<script src="js/mobiscroll.datetime-2.4.min.js"></script><!-- jQuery Mobile
framework -->
<script>
$(document).on('pagecreate', function(){
$('#dob').mobiscroll().date({
theme: 'jqm',
display: 'bottom',
mode: 'scroller'
});
});
</script>
with
<fieldset>
<legend>Verify Your Age</legend>
<div data-role="fieldcontain">
<label for="dob">Date of Birth<span class="alert"> *</span></label>
<input name="dob" id="dob" /></div>
</fieldset>
And also tried this with again, the jQuery Mobile framework
<link rel="stylesheet"
href="//code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.css"
/>
<link rel="stylesheet" type="text/css"
href="css/mobiscroll.datetime-2.4.min.css" />
<script src="//code.jquery.com/jquery-1.8.3.min.js"></script>
<script>
$(document).on('pagecreate', function(){
$.mobile.listview.prototype.options.headerTheme = "a";
$.mobile.defaultDialogTransition = 'pop';
$.mobile.defaultPageTransition = 'flip';
$.mobile.selectmenu.prototype.options.nativeMenu = false;
// I tried with and without $.mobile.ajaxEnabled=false;
});
</script>
<script
src="//code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.min.js"></
script>
<script src="js/mobiscroll.datetime-2.4.min.js"></script><!-- jQuery Mobile
framework -->
with
<fieldset>
<legend>Verify Your Age</legend>
<div data-role="fieldcontain">
<label for="dob">Date of Birth<span class="alert"> *</span></label>
<input name="dob" id="dob" data-role="mobiscroll" data-options='{ "display":
"bottom", "animate": "slideup" }' /></div>
</fieldset>
Original comment by [email protected]
on 28 Jan 2013 at 9:30
from mobiscroll.
I suppose this occurs after a page transition.
A problem can be if you are using the same id (#dob) in more than one pages,
during the transition they are present at the same time.
Original comment by [email protected]
on 29 Jan 2013 at 7:17
from mobiscroll.
[deleted comment]
from mobiscroll.
It does occur after a page transition. I have two pages with a form with a date
input using the same id. How can the id(s) be present at the same time if these
are two different pages? It is not a multi-page. Regardless, I'm going to try
changing those id(s). Not a simple task since it is the same php form called by
the two pages.
BTW Thanks for your help.
Original comment by [email protected]
on 29 Jan 2013 at 7:45
from mobiscroll.
I tried it with different id(s). I still have to reload the page. I assume the
problem has to do with Ajax. If I give the link that takes me to the page where
I need mobiscroll to be display a data-ajax="false", mobiscroll loads as it
should.
Unfortunately, I have too many files that link to that page.
Original comment by [email protected]
on 29 Jan 2013 at 8:08
from mobiscroll.
I had the same problem, IT seems to happen if you Come from a jqm page because
it uses Ajax to load the page and therefore doesn't get the files in the
header. I think there are 2 Solutions.
1 include the mobiscroll js on the page you are linning from.
2. In the links to the page you can tell jqm that it should avoid using Ajax
when fetching next page.
Original comment by [email protected]
on 6 Nov 2014 at 1:42
from mobiscroll.
Related Issues (20)
- Reopen "Plus/minus buttons cause scrolling twice" HOT 1
- formatDate() not returning correct value HOT 4
- Repeat values in the wheel after the last value HOT 2
- display given time value when scroller shows up HOT 1
- displaying month on the day wheel
- need leading 0 custom wheel in mobiscroll HOT 1
- Visual freezes on Android 2.2
- jqm theme: border color can not be changed using swatch options HOT 1
- cannot have 24:00 as endTime for a daily schedule HOT 1
- Mobiscroll timepicker flickers in android HOT 1
- dateOrder sets wrong day when no day is used in DateOrder. HOT 2
- resetting time picker when using for multiple text boxes. HOT 1
- mobiscroll with phonegap HOT 1
- Text field focus on overlay popup HOT 2
- mobiscroll.Date tap on 'Set' carry over to main screen. Ghost Click (Android 4.2.2) HOT 2
- mobiscroll resets css value -webkit-tap-highlight:rba(0,0,0,0)
- Patch for /demo.html HOT 1
- Duplicate clicks when using Date Scroller HOT 3
- Mobiscroll formatDate function, 'M' format (short month name) no longer works HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobiscroll.