Jquerymobile锚定标记问题
我正在使用jquerymobile。在它中,锚定标记总是在请求url之前添加一个#值。这样,网站的第一个默认页面运行,然后在dom中添加下一个页面。但在我的例子中,锚标记并没有添加散列值。如何添加它们 这是我的页面的标题部分Jquerymobile锚定标记问题,jquery,asp.net,asp.net-mvc,jquery-mobile,Jquery,Asp.net,Asp.net Mvc,Jquery Mobile,我正在使用jquerymobile。在它中,锚定标记总是在请求url之前添加一个#值。这样,网站的第一个默认页面运行,然后在dom中添加下一个页面。但在我的例子中,锚标记并没有添加散列值。如何添加它们 这是我的页面的标题部分 <head runat="server"> <title>Index</title> <meta name="viewport" content="width=device-width, initial-scale=
<head runat="server">
<title>Index</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
<link href="/Content/style.css" rel="stylesheet" type="text/css" />
</head>
指数
先发制人
Don't use rel=external attribute with anchor tag, If you are used
You can also use on click event : $.mobile.changePage($("#pageid"), "flip", true, true);
$("#anchortagid").live("click",function(event){
if(event.handled !== true){
$.mobile.changePage("#pageid", {transition: "slide"});
}
return false;
});