javascript 如何设置游标:jquery数据表的手
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16076284/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 03:11:39 来源:igfitidea点击:
how to set the cursor: hand for jquery data table
提问by David Ferry
I need to set the cursor: hand for particular jquery data table row selection .I try this code but not working.
我需要设置光标:hand for specific jquery data table row selection 。我尝试使用此代码但不起作用。
$(document).ready(function () {
$("#table tr").css('cursor', 'hand');
});
回答by David Ferry
This is the answer , simple :
这是答案,很简单:
<table class="display" id="table" style="cursor:pointer" width="100%"> </table>
回答by Arunkumar
$(document).ready(function () {
$("#table tr").css('cursor', 'pointer');
});
回答by Pawan Lakhara
Use this
用这个
HTML
HTML
<div class="teaser">
<img src="http://lorempixel.com/output/animals-q-c-189-137-4.jpg">
</div>
CSS
CSS
.teaser {
border-radius: 100%;
overflow: auto;
display: table-caption;
}
.js
{
cursor: -webkit-grab;
cursor: -Moz-grab;
}
JQUERY
查询
$(document).ready(function () {
$(".teaser").addClass("js")
});