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>

  • 相关阅读:
    Mybatis源代码分析之类型转换
    eclipse中对于@override注解的函数报父类没有该方法
    Mybatis源代码分析之metadata包
    Android GC
    有道单词本导出xml转换.
    广播的接收与U盘广播
    Bitmap和Drawable相互转换方法
    如何提交程序到Android Market
    error parsing xml:unbound prefix
    android获取屏幕尺寸、密度
  • 原文地址:https://www.cnblogs.com/qinyan20/p/3643163.html
Copyright © 2011-2022 走看看