css - jQuery Mobile 保持下一页的样式

标签 css jquery-mobile

我的主页使用 jQuery Mobile 样式,当我单击链接转到另一个页面 (print.php) 时,它会继续使用 jQuery Mobile 为我的 print.php 设置样式,尽管我没有将此样式添加到此页眉。

页面索引.php:

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css"> 
<!--This button goes to print.php--> 
<a class="btn" href="print.php?id=1">

页面打印.php:

<!-- I have also try to remove jQuery Mobile even if it's not added in the header-->
 <div class="container"  data-enhance="false">   

但是,当我刷新页面时它会起作用。

你能帮我吗?

谢谢

凯文

最佳答案

查看 jQM 文档:

http://demos.jquerymobile.com/1.4.5/navigation-linking-pages/

默认情况下,页面通过 AJAX 加载到当前 DOM 中。要打败这个添加

data-ajax="false"

到您的链接。

关于css - jQuery Mobile 保持下一页的样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33261767/

相关文章:

css - Angular CLI : Inject css on Sass compile without full reload?

javascript - 来自 javascript 的 Jquery Mobile 弹出消息

jquery - "Pages in a navbar initialize repeatedly"或 "Pages reinitialize on every navigation in a TabBar based App in Jquery Mobile"- Chrome

javascript - JQuery Mobile 幻灯片过渡反向但不向前

jquery-mobile - Sencha Touch 还是 jQuery Mobile?

javascript - 通过 JavaScript 定义 CSS 规则的最佳实践

html - 对齐选择和输入

jquery - DOM 元素在位置 :absolute 时不显示

html - 相对于 HTML-CSS 中的图像居中标题

jQuery Accordion 100% 宽度