Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: cursor

  1. #1
    Regular Coder
    Join Date
    Nov 2011
    Posts
    154
    Thanks
    5
    Thanked 0 Times in 0 Posts

    cursor

    .....
    Last edited by resin; 02-14-2014 at 10:05 AM.

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,916
    Thanks
    6
    Thanked 1,040 Times in 1,013 Posts
    First of all, you should not change styles with JavaScript. Rather, add and remove a class with JS and use that class in your stylesheet to change the cursor.
    Code:
    $('#div1').hover(function() {
      if($('#div2').is(':visible')) {
        $('#div1').addClass('hover');
      }
      else {
        $('#div1').removeClass('hover');
      }
    });
    Code:
    #div1.hover {cursor: …;}
    Then, make sure the file path is correct.
    Last edited by VIPStephan; 02-13-2014 at 01:45 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •