【问题标题】:how to set the cursor: hand for jquery data table如何设置光标:jquery数据表的手
【发布时间】:2013-04-18 06:48:33
【问题描述】:

我需要设置光标:用于特定 jquery 数据表行选择的手。我尝试了这段代码但不起作用。

 $(document).ready(function () {
        $("#table tr").css('cursor', 'hand');
    });

【问题讨论】:

    标签: javascript css html datatables


    【解决方案1】:

    这就是答案,很简单:

    <table class="display" id="table" style="cursor:pointer" width="100%"> </table>
    

    【讨论】:

      【解决方案2】:
      $(document).ready(function () {
          $("#table tr").css('cursor', 'pointer');
      });
      

      【讨论】:

      • 它给手符号试试吧
      • 我为你添加了小提琴。检查:jsfiddle.net/yCz4k
      • 这不适用于 jquery 数据表。我投了反对票。
      【解决方案3】:

      使用这个

      HTML

      <div class="teaser">
          <img src="http://lorempixel.com/output/animals-q-c-189-137-4.jpg">
      </div>
      

      CSS

      .teaser {
         border-radius: 100%;
      overflow: auto;
      display: table-caption;
      }
      .js
      {
         cursor: -webkit-grab;
         cursor: -Moz-grab;
      
      }
      

      JQUERY

      $(document).ready(function () {
              $(".teaser").addClass("js")
          });
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-02-21
        • 1970-01-01
        相关资源
        最近更新 更多