logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-13-2012, 02:32 PM   #1
johnMoss
johnMoss's Avatar
 
Join Date: Dec 2010
Location: Dallas
Posts: 867
Default Page change anchor; smooth scroll effect

Start page in question: http://www.johnmossdesigns.com/clien...lix/alori.html

Midway down the page and on the left there are 3 hyperlinks "collections, custom, and finishes". Currently they are set anchors to another page and anchored to the corresponding content, which to me they should be.

On the original site http://www.metalixdesign.com (products page)
they are set to just open up the page.

The client likes the original setting, which I trust we would all agree is a mistake, its confusing, as it opens up what appears to be the original page, giving the consumer effect of being a dead link.

To me a happy medium is a javascript app to open up the new page at the top like they want it, and then have it gracefully roll down to the anchor.

Anyone have a script laying around for something like that? I found a dynamic drive but it's for same page only.
__________________
LinkedIn: jM
johnMoss is offline   Reply With Quote
Old 02-13-2012, 03:22 PM   #2
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

You can use the script I compiled together for on my own one-page website. Look... if you click on the following link it will scroll to the contact section of my page.
http://www.gentlemedia.nl/#/contact-me

I zipped one time for Corrosive a page with all the necessary assets. You can download it here as well:
http://dl.dropbox.com/u/17359641/smooth-scroll.zip

I think I placed some comments in the js and in the css to explain some things, but if not just give a shout.
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 02-13-2012, 03:26 PM   #3
johnMoss
johnMoss's Avatar
 
Join Date: Dec 2010
Location: Dallas
Posts: 867
Default

awesome! Thanx
__________________
LinkedIn: jM
johnMoss is offline   Reply With Quote
Old 02-13-2012, 03:39 PM   #4
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

Quote:
Originally Posted by johnMoss View Post
awesome! Thanx
Yer welcome... good luck
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 02-13-2012, 04:51 PM   #5
johnMoss
johnMoss's Avatar
 
Join Date: Dec 2010
Location: Dallas
Posts: 867
Default

http://www.johnmossdesigns.com/clien...lix/alori.html

OK, got it loaded, just one problem, I don't have it scripted right. Go to the page above, & then scroll down & find the collections link on the left, under Alori surfaces. It goes to the anchor allright, but then scrolls to the top of the page. Desired effect of course is the opposite... Clue?
__________________
LinkedIn: jM
johnMoss is offline   Reply With Quote
Old 02-13-2012, 05:01 PM   #6
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

I guess it has a conflict with your lightbox, because that's also not working properly anymore. Try to load all your scripts in a different order. A simple switch will do wonders sometimes.
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 02-13-2012, 07:22 PM   #7
johnMoss
johnMoss's Avatar
 
Join Date: Dec 2010
Location: Dallas
Posts: 867
Default

Played with a variety of settings and still same effect. The lightbox error you refer to I'm not getting, so maybe an issue with browser type there. I did have that problem when I had the off-directory jQuery links installed, and when I removed them the script began working. Somewhere in the script I simply need to reverse the direction. Tricky
__________________
LinkedIn: jM
johnMoss is offline   Reply With Quote
Old 02-14-2012, 01:40 AM   #8
johnMoss
johnMoss's Avatar
 
Join Date: Dec 2010
Location: Dallas
Posts: 867
Default

Ok found another script from mootools. Here is a site that uses it, and a link that works perfectly.
http://www.rickyh.co.uk/barwick/site/services.html?LPSC

I have loaded the exact scripts from this page; I have played with this thing for two hours and cannot get it to work. (I did change the # to a ? on the anchor call & also tried the long link version) Moved the scripts around in the head. created a div with the anchor ID. Nothing works. Has to be a simple solution but I am baffled. Works perfectly on his site, I can't find anything amiss in my code, obviously there is... Anyone??

Links above in first thread block...
__________________
LinkedIn: jM
johnMoss is offline   Reply With Quote
Old 02-14-2012, 10:09 AM   #9
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

John, mail me this page and all its assets zipped, but without any scroll script.
http://www.johnmossdesigns.com/clien...llections.html

I know I can download the whole page and its assets with my browser, but this will create another directory structure then the original you created for it.

My mail: ralph[at]gentlemedia[dot]nl

EDIT: By the way. There's of course a lightbox on the page, so including the big photo's would make the zip file too big to mail. Don't include the big ones... I will use some photo's of mine to test functionality.
__________________
www.gentlemedia.nl

Last edited by gentleone; 02-14-2012 at 10:53 AM..
gentleone is offline   Reply With Quote
Old 02-14-2012, 01:25 PM   #10
johnMoss
johnMoss's Avatar
 
Join Date: Dec 2010
Location: Dallas
Posts: 867
Default

Course now I just read your edit... Yer right, your mail daemon bounced it on two attempts. I sent it via dropbox, you should have an invitation waiting in your email... Thanx bro )
__________________
LinkedIn: jM
johnMoss is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:59 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com