zoukankan      html  css  js  c++  java
  • 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>

  • 相关阅读:
    应急响应中find命令总结
    应急响应排查思路
    硬链接与软链接的区别
    Linux开机启动项总结
    android 開發常用網站
    epoll
    Qualcomm platform, the commonly used parameters of charger and battery in device tree file
    why not ovp protection ?
    Performance tuning
    Using adb over wifi
  • 原文地址:https://www.cnblogs.com/qinyan20/p/3643163.html
Copyright © 2011-2022 走看看