CSS menu reacts to smooth scroll

This is not a big issue but I am curious. I am building holding page

Navigating with the menu to the contact page works as it should do. On the contacts page are two anchors (linked to ‘view plans’ and ‘back to top’ plus the smooth scroll action. Also works. But if you click on ‘contacts’ in the menu a second time the page gently goes up to place the menu at the top of the window. If I remove the smooth scroll then the page stays static and the anchors just work as anchors.

Any ideas anyone why this is happening, and can I fix it?

Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The SmoothScroll Action works by “hooking” the click event on anchors. If the anchor is to an object on the current page, then it will try to scroll to that object it any time that link is clicked. If you’re seeing something besides this, please let me know, it wasn’t clear from your description.

Walter

On Oct 15, 2011, at 12:51 PM, Richard Lowther wrote:

This is not a big issue but I am curious. I am building holding page

Navigating with the menu to the contact page works as it should do. On the contacts page are two anchors (linked to ‘view plans’ and ‘back to top’ plus the smooth scroll action. Also works. But if you click on ‘contacts’ in the menu a second time the page gently goes up to place the menu at the top of the window. If I remove the smooth scroll then the page stays static and the anchors just work as anchors.

Any ideas anyone why this is happening, and can I fix it?

Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry for the poor explanation Walter. Let me try again. The anchors and the smooth scroll all work well. But there is an additional event. When the content page is open if you click on the menu item for that page in the CSS menu there is a a smooth scroll taking the CSS menu to the top of the window. Also happens on a another site I have built.

If this is unclear can you open this page holding page and click on ‘content’ in the menu and you will see what I mean.

Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sorry, I’m still not seeing what you mean. I went to the page, searched everywhere on it for a link labeled “content”, couldn’t find one, clicked on “contact” instead, and the page smooth-scrolled down to the contact form. Clicking that “contact” menu item in the navigation always moves me to the contact form.

As far as the CSS Menu on that page, you can probably sort this out by simply adding a link to the current page in that item. Right now, it’s linked to the “empty” link (a #) by the CSS Menu Action, because without a link going somewhere, the menu won’t look correct. You can also try changing it to a link to javascript:void(); and see if that fixes everything for you.

Walter

On Oct 15, 2011, at 2:27 PM, Richard Lowther wrote:

Sorry for the poor explanation Walter. Let me try again. The anchors and the smooth scroll all work well. But there is an additional event. When the content page is open if you click on the menu item for that page in the CSS menu there is a a smooth scroll taking the CSS menu to the top of the window. Also happens on a another site I have built.

If this is unclear can you open this page holding page and click on ‘content’ in the menu and you will see what I mean.

Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Really sorry about that and the confusion caused by my not taking enough care with posts. Yes I meant “contact”.
Something similar happens on this site http://www.barbaradelaruelle.com/contact.html. I have created the CSS menu with all the links which work. I have created anchors with links to them which work. (these are ‘voir plan’ and ‘back to top’) But clicking on the menu item for that page when you are on that page scrolls the page to what seems to me a random position leaving half the contact form hidden.

My apologies in advance but I do not understand what you mean by “simply adding a link to the current page in that item. Right now, it’s linked to the “empty” link (a #) by the CSS Menu Action” The links have been created in the CSS menu and move the visitor to each page as they should. It is clicking on the link a second time that brings about the unwanted shift. Not too important as why would anyone click on a link to a page they are already on but nevertheless a little confusing for me.

best wishes
 Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Maybe the Action is taking away the existing link to that page when you’re on the page it refers to. That’s something I could imagine it doing automatically. If that’s the case, I’m not sure what I can do. Please do make sure you have the very latest version of this Action, as there was quite a lot of work put into avoiding missing link targets, and there really shouldn’t be anything on the page that matches an empty # link.

Walter

On Oct 15, 2011, at 3:56 PM, Richard Lowther wrote:

The links have been created in the CSS menu and move the visitor to each page as they should. It is clicking on the link a second time that brings about the unwanted shift. Not too important as why would anyone click on a link to a page they are already on but nevertheless a little confusing for me.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walter. I am on the latest Smoothscroll action - 0.4.1 ?

However I have a small improvement on http://www.barbaradelaruelle.com/contact.html. I sent the CSS menu item to the back and now the page only shifts a small amount lining up the menu to the top of the window whereas before it moved much further to what seemed to a random position - ie not to either a link or an anchor.

I, and I am sure page visitors too, will cope with what will be a rare occurrence.

Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Richard,

I actually thought the first ‘realignment’ to the email was quite cool though I really don’t know why anyone would particularly wish to click on ‘contact’ for a second time anyway.
Perhaps if you created a small blank html item at the very top of the contact page and directed ‘contact’ to that ie. #top. that might resolve the issue.
I did this with a jquery smooth scroll on a single page site I should add.

or am I also missing something.

s


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

No I don’t think your missing anything Seoras and maybe I should take a fresh look at the site. If I have achieved something cool maybe I should stick with it as it does not happen that often!

I will also try your idea of a blank html item at the top of the page to - just to see if I can do it.

Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Seoras

Thanks - that resolved it. ‘Contact’ in the menu is now linked to the existing anchor #top used by ‘Back to Top’ ( Which also reminds to translate that into French). Now stable but lacking cool - hohum

Best wishes Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options