PDA

View Full Version : Hover state for 'jQuery Scroll to Top Control' script



stinkystink
10-30-2012, 02:52 PM
1) Script Title: jQuery Scroll to Top Control

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex3/scrolltop.htm

3) Describe problem: Hello, I was wondering anybody would be kind enough to help me out. I have inserted the above script into my site and I have changed the button to something I designed. I would really like to insert a hover state (*maybe* with a fade transition if that's doable, but not critical). If anyone out there could give me some pointers, I really am not a coding expert at all.

Thank you in advance!

ddadmin
10-31-2012, 04:17 AM
Going with just a basic image swap on hover for now, try the below modified .js file. Near the top of this file, specify the path to the hover image:


hoverimage: 'scrollupover.png',

stinkystink
10-31-2012, 10:42 AM
Hello,

It works wonderfully, thank you ever so much!

I have been trying to get this into my site for months and its been a constant course of frustration. How difficult would it be for the fade? (Not that I want to be annoyingly expectant.), I had a look around and pasted a couple of things into the Java, nothing has worked so far. I was looking at the fadein function, this morning, which seemed to make the most sense at being correct but I haven't tried it out yet.

Once again thank you very much

ddadmin
11-01-2012, 04:09 PM
It's a bit more involved, but try the below modified .js file, which should add a fade between the images used for the scroll up effect.

stinkystink
11-03-2012, 11:23 AM
Hello again,

Thanks a lot, but it hasn't worked. Nevermind, I have another problem which it would seem that the script has interfered with the script I have on my front page slide show gallery which needs fixing.

It caused a problem with the galleries but removing the jQuery call up (that's probably not what it is..!) fixed it on advice of the applications developer as jQuery is included in the application anyway.

Thanks very much again!

ddadmin
11-04-2012, 10:42 PM
Hmm are you still having troubles with the Scroll To Top script conflicting with your other script? Can't tell for sure whether it's been resolved or not based on the above.

stinkystink
11-10-2012, 04:28 PM
Yes, it does seem a bit vague. Sorry.

The fade doesn't really work. But I think it looks fine as it is, without the fade. The image is fairly thin so a fade probably wouldn't add much anyway.

Thanks again for the help!