Grow your CSS skills. Land your dream job.

Click event & Cursor style

  • # May 29, 2009 at 5:46 pm

    If anyone can offer some help here it would be great. I’ve searched all over the interwebs and cannot find a solution.

    After an ajax/dhtml click event, the cursor style automatically changes from "pointer" to "default". The cursor will not change back to the "pointer" style unless you mouseout and then mouse back in. Normally this is not a problem but I have an instance where the link triggers a jQuery slidedown effect with an adjacent link. After the click the cursor switches to the default style and stays that way when I mouse to the newly exposed link. I’ve tried all sorts of tricks to force the cursor style but nothing has worked.

    Has anyone dealt with this before?

    Here’s a link to a demo. Both "blocks" are images and both are linked. Again, the goal is to be able to click the link and then have the "pointer" cursor show when you mouse into the darker box.

    http://parasolchute.com/clickCursor/

    Thanks!
    A.S.

    # May 30, 2009 at 11:15 pm

    I’m not sure I understand what the problem is. It sounds like you want the hand/pointer to appear when hovered over the "Click here to register" link. As shown in the screenshot below, this is already happening and it does so in Firefox and IE6-8.

    [img]http://img200.imageshack.us/img200/166/5302009111135pm.png[/img]

    I must be confused. Please clarify.

    # May 31, 2009 at 10:27 am
    "astephens" wrote:
    After an ajax/dhtml click event, the cursor style automatically changes from "pointer" to "default".

    This doesn’t happen in my browser, maybe you are using an utterly broken browser?

    # June 1, 2009 at 12:45 pm

    Thanks a lot for taking the time to look at it.

    I should have mentioned that the problem was NOT happening in IE 6+. I was experiencing it in Mac Firefox + Safari. I just checked Firefox on the PC and it seems to be fine, so it’s not such a problem after all. It still happens for me in Firefox on the mac but maybe it’s being caused by some plugin or something else.

    Thanks!

    # June 1, 2009 at 1:32 pm

    Works fine for me in Firefox 3.0.1 on the mac.

    # June 16, 2009 at 9:20 pm

    Hi, astephens

    when i’m testing your demo on osx everything is ok but when i test my the problem occurs. I have noticed that this bug only exists on osx on every link so this can’t be js bug. Here’s a short video about this: Link

    Ps. sorry for bad english.

    # June 17, 2009 at 5:15 am
    "astephens" wrote:
    Thanks a lot for taking the time to look at it.

    No problem, I should have mentioned I’m on a PC. Looks like it affects Mac only. For once, a bug that only inflicts Mac users :mrgreen:

    # June 18, 2009 at 5:34 pm

    So, after it slides, you want the cursor to be the black default instead of the hand?

    if so,

    Could you do something like $(this).css("cursor","default");

    or something to that effect?

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".