How strange the textinput method behavior in jquery mobile
The version of Jquery and Jquery Mobile
jquery-1.9.1.min.js
jquery.mobile-1.3.2.min.js
I have some tests about the textinput plugin of input element
This is my code
<div data-role="page" id="index">
<div data-role="content">
<form>
<label for="text-1">Text input:</label>
<input type="text" name="text-1" id="text-1" value="">
<input type="button" name="text-3" class="btnFinish"
value="Finish">
</form>
</div>
</div>
<script>
$(document).on('pageinit', function () {
$('#text-1').textinput({ theme: 'a' });
$('.btnFinish').buttonMarkup({corners: false });
});
</script>
The text input element's theme is not changed. But when I comment the
pageinit event, the text input element's theme will be changed.
<script>
//$(document).on('pageinit', function () {
$('#text-1').textinput({ theme: 'a' });
$('.btnFinish').buttonMarkup({corners: false });
//});
</script>
And I've try other events just like pagecreate, pageload, pageshow, the
text input are all not be changed.
And I also tried the ready event in jquery, it's not effective too.
But $('.btnFinish').buttonMarkup({corners: false }); is always effective.
And the conclusion is that "The textinput method is effective not in any
event?", I think it is very strange. Someone can explain it? Thx very
much.
No comments:
Post a Comment