Log in

View Full Version : Custom Cursor script no longer working



rockinrick
05-05-2014, 05:34 PM
1) Script Title: Custom Cursor Script

2) Script URL (on DD) http://www.dynamicdrive.com/dynamicindex11/customcursor.htm

3) Describe problem: Been awhile since I used this. It's not working with IE11. Am I doing something wrong, or do I need to modify the script?

Many, many thanks,
Rick

jscheuer1
05-05-2014, 06:54 PM
You now have to provide a valid standard fall back cursor, ex:


<style type="text/css">
body {cursor: url(mycursor.cur), auto;}
</style>

Also some browsers are more liberal about what they will allow as a custom cursor. Some will use various image formats. In IE, I believe it must be a valid .cur (cursor file) or valid .ani (animated cursor file).

The browser cache may need to be cleared and/or the page refreshed to see changes.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

rockinrick
05-05-2014, 09:31 PM
Thank you John! That did the trick!

Do you know of a script I could use for a hand cursor to appear on the links?

Many thanks again,
Rick

jscheuer1
05-05-2014, 11:18 PM
I had wanted to mention before that this isn't really a script. It's just ordinary css. Most browsers will use the hand (now known as 'pointer') cursor on links anyway. But some might not. To ensure that they do, working from my previous example, add the highlighted:


<style type="text/css">
body {cursor: url(mycursor.cur), auto;}
a {cursor: pointer;}
</style>

For more information on css see:

http://www.blooberry.com/indexdot/css/propindex/all.htm

http://www.w3schools.com/css/DEFAULT.asp

or your favorite css resource.

rockinrick
05-05-2014, 11:49 PM
Thank you for so much John. Years ago I made a website that used <span> assigning a custom hand cursor to every link. I've Googled all day trying to find
how to use 2 custom cursors on 1 web page. http://www.rockinrick.us is where my old code is on every link. It's been awhile!

Many thanks,
Rick

rockinrick
05-06-2014, 04:11 AM
Hello, I downloaded the custom cursors from DD and have a custom body cursor, but I need to know how to assign another custom cursor for hyperlinks. (downloaded from DD).

Been on Google all day trying to find the answer. I've done it about 10 years ago, but it won't work now.

My site is: http://www.rockinrick.us

Many thanks,
Rick

jscheuer1
05-06-2014, 06:17 AM
<style type="text/css">
body {cursor: url(mycursor.cur), auto;}
a {cursor: url(myothercursor.cur), pointer;}
</style>

But if you want each link to have a different cursor, you can use class names:


<style type="text/css">
body {cursor: url(mycursor.cur), auto;}
a.cur1 {cursor: url(myothercursor.cur), pointer;}
a.cur2 {cursor: url(myyetanothercursor.cur), pointer;}
</style>

Then for one link have:


<a class="cur1" href="whatever.htm">Whatever</a>

and for the other:


<a class="cur2" href="someother.htm">Someother</a>

You can do this as many times as you like for as many different cursors/links as you want to have. And if by chance with this setup you want two or more links to have the same cursor, just give them the same class.

rockinrick
05-06-2014, 05:14 PM
Thank you John!
This is exactly what I was looking for.

Many thanks again,
Rick

rockinrick
05-06-2014, 11:13 PM
Thank you again John. Just one more question. How can I apply my link styles, such as underline, overline? With the script you provided, they no longer work.

Many thanks for your time and help,
Rick

jscheuer1
05-07-2014, 02:12 AM
I don't see why they wouldn't, could you be more specific and/or link me to a before (working) and after (not working) demo?

rockinrick
05-07-2014, 02:26 AM
Hello John,
the menu links before are here http://www.rockinrick.us the links are shown with an underline.
After the css you provided the links show no underline http://www.rockinrick.us/evp.html

Menu is located on the right side. Please feel free to look at the source code.

Thank you so much,
Rick

jscheuer1
05-07-2014, 03:14 AM
These rules on line 23 of evp.html are governing that:


a:link.liquiddesert {color: #62899E; text-decoration: none }
a:visited.liquiddesert {color: #62899E; text-decoration: none }
a:hover.liquiddesert {color: #00ff00; text-decoration: underline overline; cursor:Hand.green }


remove the highlighted.

rockinrick
05-07-2014, 04:06 PM
Very cool John!
Thank you so much. I put this together around 10 years ago and just came back to it. Many things have changed!

Be well,
Rick