You can use data-enhance="false"
in conjunction with $.mobile.ignoreContentEnabled=true
to stop the auto-enhancement that jQuery Mobile does to a pseudo-page:
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script>
$(document).on('mobileinit', function () {
$.mobile.ignoreContentEnabled = true;
});
</script>
<script src="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.js"></script>
<div data-enhance="false" data-role="page">
...
</div>?
The reason you have to change the ignoreContentEnabled
flag is because it's CPU intensive to search parent elements for the data-attribute
, so this is turned-off by default.
Here is a demo: http://jsfiddle.net/ZtJyL/1/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…