mba首页js
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>
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。