Jquery 移动深度链接(某种程度上)
Jquery mobile Deeplinking (sort of)
我正在使用多页 jquery
移动设备,需要创建一个 link 从一个 "page" 到另一个 "page" 上的内容。
我可以直接完成 <a>
还是需要添加额外的代码?
代码:
<body>
<div style="min-height: 880px;" class="ui-page ui-body-c" data-role="page" id="Welcome"
tabindex="0" data-url="Welcome">
<!--- some content here =-->
<!--- further down the "page" link =-->
<a class="ui-link" href="#abstractday1" data-ajax="false">Abstract Day 1</a>
<!--- link that has been shortened just to a to save time =-->
</div>
<div style="min-height: 880px;" class="ui-page ui-body-c" data-role="page" id=
"Abstract" tabindex="0" data-url="Abstract">
<!--- further down the "page" where i want to goto =-->
<!--- below is where I want to go from welcome link =-->
<a class="ui-link" name="abstractday1"></a>
</div>
</body>
我已经想出了答案,花了一些时间思考。
我会添加答案以供其他人使用。
脚本/js :
function myFunction(val) {
setTimeout( function(){
window.location.href = ""+ val +"";
} , 1000 );
}
link:
<a class="ui-link" href="#Abstract" onclick="myFunction('#abstractday1')" data-ajax="false">Abstract Day 1</a>
快乐编码:)
我正在使用多页 jquery
移动设备,需要创建一个 link 从一个 "page" 到另一个 "page" 上的内容。
我可以直接完成 <a>
还是需要添加额外的代码?
代码:
<body>
<div style="min-height: 880px;" class="ui-page ui-body-c" data-role="page" id="Welcome"
tabindex="0" data-url="Welcome">
<!--- some content here =-->
<!--- further down the "page" link =-->
<a class="ui-link" href="#abstractday1" data-ajax="false">Abstract Day 1</a>
<!--- link that has been shortened just to a to save time =-->
</div>
<div style="min-height: 880px;" class="ui-page ui-body-c" data-role="page" id=
"Abstract" tabindex="0" data-url="Abstract">
<!--- further down the "page" where i want to goto =-->
<!--- below is where I want to go from welcome link =-->
<a class="ui-link" name="abstractday1"></a>
</div>
</body>
我已经想出了答案,花了一些时间思考。
我会添加答案以供其他人使用。
脚本/js :
function myFunction(val) {
setTimeout( function(){
window.location.href = ""+ val +"";
} , 1000 );
}
link:
<a class="ui-link" href="#Abstract" onclick="myFunction('#abstractday1')" data-ajax="false">Abstract Day 1</a>
快乐编码:)