Click here to Skip to main content
12,300,021 members (52,073 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: jQuery
I want to change the mouse pointer on an event but it is not changing. Debugger shows that the event is firing but there is also not any problem with code there, is any?
this.top = $('#rootDiv_' + root);
 
this.top.mouseenter(function () {
            this.top.style.cursor = "pointer";
        });
Posted 23-Dec-12 21:41pm
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Oh! I found the solution while posting it but post the question to give the solution others. I just followed 'this' in 'mouseenter' event and found that 'this' is already the div 'top'. Then why should I tell 'this' to select the 'top'. Then I obsolete the 'top' and the final code is:

this.top = $('#rootDiv_' + root); //Saves the created div in top.

this.top.mouseenter(function () {
            this.style.cursor = "pointer";
        });
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

try this

$("element").cursor("pointer")
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160525.2 | Last Updated 24 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100