I have a common pagination code, in the form of cshtml as a partial view:
<div id="paging"> <span></span> <span></span> <a data-mini="true" class="action ui-btn" data-bind="css: previousPageEnabled() ? '' : 'ui-disabled'"><</a> <a data-mini="true" class="action ui-btn" data-bind="css: nextPageEnabled() ? '' : 'ui-disabled'"><</a> </div>
The corresponding js code is as follows:
(function($, model){ function injectPaging(viewModel. selector, pageSize){ //执行分页部分的代码 } }
The main view uses jquery: jquery.mobile-1.4.5.js Through the debugger console, I get an error at this line (9408):
this.removeClass( "ui-flipswitch-input" );
Link to jquery page: http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.js
The problem now is that this code works fine on all pages, because this paging code is used by all other views that implement pagination, only one view has the problem. I don't want to change anything in the jQuery file, and I have no idea what's causing this exact problem.
According to jquery-mobile's Github page, try replacing the relevant lines with the following code:
You can try to update jquery-mobile to version 1.5.0-rc1, the bug seems to have been fixed in that version.