how do you get the spinning mouse pointer?

Discussion in 'PHP' started by articledirectory, Oct 12, 2009.

  1. #1
    is there anyway to use the spinning mouse pointer to show between page loads?

    i have this code to put in my css file

    <style type="text/css">
    .wait { cursor: wait }
    </style>
    Code (markup):
    but how do you get the pointer to spin when you load different pages?
     
    articledirectory, Oct 12, 2009 IP
  2. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Add it to the body tag:

    http://www.echoecho.com/csscursors.htm

    Look for the section about "REDEFINING THE CURSOR FOR ENTIRE PAGES" (Sorry for the CAPS. It's copy and paste)

    Hope this helps,
    -drmike

    edit: Now that I reread that page, the next section would probably be better: "REDEFINING THE CURSOR FOR AREAS ON A PAGE" Just put the whole page within that span. Plus the body example appears not to work in Firefox for some reason.
     
    theapparatus, Oct 12, 2009 IP
  3. articledirectory

    articledirectory Peon

    Messages:
    1,704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I tired the example at it didnt work, or its possible the page loads to quick to show the mouse pointer spinning.
     
    articledirectory, Oct 13, 2009 IP
  4. theapparatus

    theapparatus Peon

    Messages:
    2,925
    Likes Received:
    119
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It's customary to provide a link so we can see what's occurring when you say you;ve tried something and it didn't work. Else all we can do is make guesses.
     
    theapparatus, Oct 13, 2009 IP
  5. articledirectory

    articledirectory Peon

    Messages:
    1,704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #5
    sorry but its a fb app in sandbox mode so you wouldn't be able to see it even if i gave you the link, but i appreciate your response and help.
    Regards.
     
    articledirectory, Oct 13, 2009 IP
  6. IAreWhiteCat

    IAreWhiteCat Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    What do you mean by spinning mouse pointer?

    Do you mean the blue circle that spins when a new page is loading

    or

    A mouse pointer that spins around?
     
    IAreWhiteCat, Oct 13, 2009 IP
  7. articledirectory

    articledirectory Peon

    Messages:
    1,704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #7
    yes the mouse pointer, i want it to emulate the blue spinning circle you get when the page is loading
     
    articledirectory, Oct 14, 2009 IP
  8. WillDee

    WillDee Peon

    Messages:
    68
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Drink a lot of vodka. Look at cursor on screen. It will spin.
     
    WillDee, Oct 15, 2009 IP
  9. Luke Carrier

    Luke Carrier Peon

    Messages:
    19
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Put the contents of the page in a <div> with the following style code:

    div#container {
    cursor: wait;
    }
    Code (markup):
    Then use something like this at the end of the page (before the </body> tag) to revert the cursor:

    <script type="text/javascript">
    document.getElementById('container').style.cursor = '';
    </script>
    Code (markup):
    If you're doing this to lots of pages, I'd suggest putting the JS code into a function to make it easier to maintain. I haven't tested this either, but it should work :)
     
    Luke Carrier, Oct 17, 2009 IP
  10. articledirectory

    articledirectory Peon

    Messages:
    1,704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thanks, i have had some success with this, i can get it to spin, but it wont stop spinning, as its a fb app, there is no body tags so i tried adding the js code just outside the closing div tag for the container, but it doesnt seem to stop the pointer spinning.

     
    articledirectory, Oct 17, 2009 IP
  11. Luke Carrier

    Luke Carrier Peon

    Messages:
    19
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Does replacing '' with 'auto' resolve the problem (in the JS block)?
     
    Luke Carrier, Oct 17, 2009 IP
  12. articledirectory

    articledirectory Peon

    Messages:
    1,704
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #12
    nope, still spinning like crazy :)
     
    articledirectory, Oct 17, 2009 IP
  13. Luke Carrier

    Luke Carrier Peon

    Messages:
    19
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Been playing, I came up with this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
    	<head>
    		<style type="text/css">
    			body {
    				cursor: wait;
    			}
    		</style>
    		<script type="text/javascript"><!--
    			function NormaliseCursor() {
    				document.body.style.cursor = 'auto';
    			}
    		//--></script>
    	</head>
    	<body>
    		<p>Click <a href="javascript:NormaliseCursor()">here</a> to disable the cursor.</p>
    	</body>
    </html>
    Code (markup):
     
    Last edited: Oct 17, 2009
    Luke Carrier, Oct 17, 2009 IP