doupai6875 2014-06-14 17:33
浏览 50
已采纳

JQuery移动样式持续到页面我链接到

I am using a link from a page where I use Jquery Mobile to a page where I do not. For some reason the Jquery Mobile styling persist onto the page that I link to UNTIL I refresh the page, in which case the page loads correctly. I am pretty baffled at what might cause this issue, and I have tested it on both Firefox and Chrome. I have tried disabling caching all with no luck.

Does anyone have an idea what could cause this?

Thanks in advance.

hello_world.php:

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css">
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>
</head>
<body>
<a href="create2.php" data-icon="plus" class="ui-btn-left">Create</a>

</body>
</html>

create2.php:

<!DOCTYPE HTML> 
<html>
<head>
</head>
<body> 
<form>
Title: <input type="text" name="title" value="">
submit: <input type="submit" value="submit">
</form>
</body>
</html>
  • 写回答

1条回答 默认 最新

  • duanchuaiwan0063 2014-06-14 17:47
    关注

    refer this page to understand how jquerymobile's link works

    put this attributes to anchor rel="external", data-ajax="false"

    http://demos.jquerymobile.com/1.2.0/docs/pages/page-links.html

    Links that point to other domains or that have rel="external", data-ajax="false" or target attributes will not be loaded with Ajax

    Default link behavior: Ajax

    To enable animated page transitions, all links that point to an external page (ex. products.html) will be loaded via Ajax. To do this unobtrusively, the framework parses the link's href to formulate an Ajax request (Hijax) and displays the loading spinner. All this is done automatically by jQuery Mobile.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 matlab yalmip kkt 双层优化问题
  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题