0

I've a little problem with a jQuery Mobile app I'm building. I have page where a back button using data-rel="back. It works well except in one case :

These page can be access by a link from an e-mail. So, when you come from the e-mail, the back button will not work.

So, is there a way to test if there is a previous URL or if the user comes from an e-mail ?

4

2 回答 2

0

好的,也许这是一个更好的选择。

$(document).ready(function(){
    $('a[data-rel="back"]').hide();
})

$('a').on('click', function(){
    $('a[data-rel="back"]').show();
});
于 2012-04-25T11:24:05.763 回答
0

你能检查一下 data-rel='back' 属性吗?

$("a:jqmData(rel='back')").length

例子:

于 2012-04-25T13:41:39.927 回答