【发布时间】:2015-02-26 07:59:37
【问题描述】:
$('#news_details').bind('pageAnimationEnd', function (e, info) {
// get the id of the calling href
//alert('we are here');
var id = $(this).data('referrer')[0].id;
//alert(id);
$.get('http://localhost/school_app/admin/json/news_pagination.php?id=' + id, function (data) {
// do something with the data
//alert(data);
$('#detail_news').append(data);
//alert('we are here');
});
});
我正在获取这个 id 并将其传递给 #news_details 页面,它是成功的,但是当我喜欢该页面时,脚本会自动发生,当我使用另一个 id var 转到 #new_detail 页面时数据还在。
请帮帮我。
【问题讨论】:
标签: jquery jquery-events jqtouch