2012-04-09 50 views

回答

0

jQuery的

$('div:hover').css({'cursor':'whatever'}); 

OR

$('div').scroll(function() { 
    $(this).css({'cursor':'whatever'}); 
}); 

CSS

div:hover { cursor: whatever } 

看到光標選擇這裏: http://www.w3schools.com/cssref/pr_class_cursor.asp

+0

但是,當我將鼠標移到該元素上時,它會更改指針。我只想在用戶滾動該元素時更改光標。我得到的想法是,我必須在滾動到該元素時更改光標。我對嗎? – 2012-04-09 14:48:26

+0

查看第二個jQuery示例。用更具體的id或class更新你的選擇器。 – iambriansreed 2012-04-09 15:06:56

+0

是的,它解決了我的問題。 – 2012-04-10 07:03:54

0
$("#MyDivsID").on('scroll', function() { 
    $(this).css('cursor', 'pointer'); //or whatever cursor you'd like 
});