2 Replies - 320 Views - Last Post: 31 January 2012 - 11:24 PM

Topic Sponsor:

#1 dunsta  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 78
  • Joined: 08-April 10

no cursor "wheel spin / loading" when cursor is hovering over

Posted 30 January 2012 - 06:35 PM

Hi,

I have a feature where the cursor spins when the page is waiting, after a user clicks.

The HTML in the button tag
onmousedown="cursor_wait()"


The corresponding Javascript
function cursor_wait() {
  document.body.style.cursor = 'wait';
}



The feature only works when the cursor is not hovering over a button.
How can I add this feature to display when the cursor is over a button?

Thanks.

This post has been edited by dunsta: 30 January 2012 - 06:38 PM


Is This A Good Question/Topic? 0
  • +

Replies To: no cursor "wheel spin / loading" when cursor is hovering over

#2 Shane Hudson  Icon User is offline

  • D.I.C Technophile
  • member icon

Reputation: 326
  • View blog
  • Posts: 1,266
  • Joined: 06-December 09

Re: no cursor "wheel spin / loading" when cursor is hovering over

Posted 31 January 2012 - 12:40 AM

Well I expect you could use onmouseover instead of onmouseclick but if you have not looked into it already, I would suggest thinking about using CSS to do this.

Example
Was This Post Helpful? 0
  • +
  • -

#3 dunsta  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 78
  • Joined: 08-April 10

Re: no cursor "wheel spin / loading" when cursor is hovering over

Posted 31 January 2012 - 11:24 PM

Thanks Shane,

I have used "onmousedown" so that the wheel spins while the form is loading.
I expect "onmouseover" will "spin" each time I hover over a button, and thats not what I am looking for.

Also, I noticed that in Chrome, I have the problem in the OP, but in IE9, the mouse spins while the page is loading - whether the mouse is hovering over the button or not.

I havent looked into how to relate this to css.
I understand css has a hover feature, but I wouldnt know how to do the logic of
if(mousedown && button.hover)
then wheelspin.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1