How to change cursor from pointer to finger using jQuery?

前端 未结 4 1099
北恋
北恋 2020-12-12 16:36

This is probably really easy, but I\'ve never done it before. How do you change your cursor to the finger (like for clicking on links) instead of the regular pointer?

<
4条回答
  •  情书的邮戳
    2020-12-12 17:28

    It is very straight forward

    HTML

    
    
    
    

    jQuery

    $(document).ready(function(){
      $('.button').css( 'cursor', 'pointer' );
    
      // for old IE browsers
      $('.button').css( 'cursor', 'hand' ); 
    });
    

    Check it out on JSfiddle

提交回复
热议问题