最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Need to show hand cursor in Grid element - Stack Overflow

programmeradmin1浏览0评论

I have an ExtJS Grid, which has 5 columns.

In one of the columns, I am displaying an image using a div element dynamically from a renderer when clicking on some other button. I want to display a hand cursor when hovering over the image displayed by my renderer.

I tried adding inline style and onmouseover handler to display hand cursor. Hand cursor is ing when the very first time I load the grid and the onmouseover handler is also getting called. But when I load another set of data in the same grid, the hand cursor is not ing and the onmouseover handler is also not gettng called?

Could you help me get a hand cursor when hovering over the image which is rendered in a div tag in the grid cell.

I have an ExtJS Grid, which has 5 columns.

In one of the columns, I am displaying an image using a div element dynamically from a renderer when clicking on some other button. I want to display a hand cursor when hovering over the image displayed by my renderer.

I tried adding inline style and onmouseover handler to display hand cursor. Hand cursor is ing when the very first time I load the grid and the onmouseover handler is also getting called. But when I load another set of data in the same grid, the hand cursor is not ing and the onmouseover handler is also not gettng called?

Could you help me get a hand cursor when hovering over the image which is rendered in a div tag in the grid cell.

Share Improve this question edited Aug 1, 2012 at 21:14 egerardus 11.5k12 gold badges83 silver badges127 bronze badges asked Aug 1, 2012 at 7:59 RoboRobo 2712 gold badges5 silver badges13 bronze badges 0
Add a ment  | 

2 Answers 2

Reset to default 3

Give your element a class like <div class="myclass"> or <td class="myclass">. Also in your CSS, add;

.myclass{
cursor: pointer;
}

Finally, if you want hand over all images, simply add the following line into your style;

img{
cursor: pointer;
}

You can do that by applying CSS like

.imgStyleHand {cursor:pointer}

or by style like

<img style="cursor:pointer" src="" alt="" />
发布评论

评论列表(0)

  1. 暂无评论