js获取随机时间戳 (new Date()).getTime()
<script type="text/javascript">
$(function(){
$('.teach_list').click(function() {
$('.mba_business_body ul.teach_li').toggle();
$('.teach_list').toggleClass('root');
});
$('.mba_business').on('click', '.next_following_companies', function() {
var $this = $(this);
var page = $this.attr('p');
if (page ){
$.get("ajax/following/companies/feed", {current_user_id : <%=
current_user_id %>, page : page, t:(new Date()).getTime() }, function
(data) {
if (data.success)
$this.parent().empty().append(data.html);
}, 'json');
}
});
$('.mba_business').on('click', '.next_follow_some_companies', function() {
var $this = $(this);
var page = $this.attr('p');
if (page ){
$.get("ajax/following/companies/feed", {page : page, t:(new Date()).getTime() }, function (data) {
if (data.success)
$this.parent().empty().append(data.html);
}, 'json');
}
});
$('.mba_business_left').on('click', '.follow_company', function() {
var $this = $(this);
var date_status = $this.attr('date_status');
var company_ids = $this.attr('c_ids');
if (<%= current_user_id %>){
if (date_status == 1 ){
$.get("/ajax/add/company/followers", {current_user_id : <%=
current_user_id %>, company_ids : company_ids }, function (data) {
if (data.success){
$this.attr('date_status',0);
var this_btn = $this.find(".mba_abtn");
this_btn.attr("class","mba_abtn_gz");
}
}, 'json');
}
}else{
alert('请登录后操作');
}
});
$('.mba_business_left').on('click', '#remove_mba_btn_gzs', function() {
var $this = $(this);
var date_status = $this.attr('date_status');
var company_ids = $this.attr('c_ids');
if (date_status == 1 ){
$.get("/ajax/add/company/followers", {current_user_id : <%=
current_user_id %>, company_ids : company_ids }, function (data) {
if (data.success)
$this.parent().empty().append("<a class='mba_btn'>已关注</a>");
}, 'json');
}
});
});
</script>