Anchor links close popup layer problem
Have a popup problem..
I'm creating a custom mobile menu using a popup layer. I have the popup layer locked using (lock) and added a custom close button using popup:close
Now on the popup layer I have two Link to anchor links that go to anchors on the page. Clicking an anchor link on the popup layer goes to the page section fine but the popup layer remains visible blocking the content, ideally I would like the popup layer to close when clicking an anchor link.
I tried selecting Link to anchor option and using popup:close in Link to field but you can't have both at the same time.
Putting "#anchorname popup:close" in the Link to field just makes a broken link with all that text and "popup:close #anchorname" is just popup:close without the link. Would be nice if you could use it this way with anchor links but seems you can't.
Does anyone know a way of closing the popup when clicking an anchor link?
Re: Anchor links close popup layer problem
xtom, not tried but just a thought.
Can you include Open link: Same window (_top)?
Acorn
Re: Anchor links close popup layer problem
I make pop-up layer menus for all my mobile sites and all I do is untick the 'close pop-up automatically'. The pop-up closes when the visitor navigates to whatever page they've tapped on. True, you do have the ugly little cross to close manually, but it's not in your face and no one has ever mentioned it when I've sent the site out for approval and testing.
Re: Anchor links close popup layer problem
Quote:
Can you include Open link: Same window (_top)?
Hmm that makes popup disappear in the preview but not when I preview in Firefox or Chrome.
Quote:
I make pop-up layer menus for all my mobile sites and all I do is untick the 'close pop-up automatically'. The pop-up closes when the visitor navigates to whatever page they've tapped on. True, you do have the ugly little cross to close manually, but it's not in your face and no one has ever mentioned it when I've sent the site out for approval and testing.
I tried this but I don't like this default close button especially on a main nav menu. Also if you use same page anchor links it's still seems the same problem in that it won't close automatically, you still have to click either the default close button or a custom one. Not an iassue when changing pages but it is for the same page anchor links.
Re: Anchor links close popup layer problem
xtom, could you put a bare-bones text file together for all the things you are using?
I don't want to spend time building up the wrong thing.
Acorn
Re: Anchor links close popup layer problem
Experimenting with it for a while now and I think one way of doing it would be to add a query with a random string into the link so something like /?r=123#myanchor to force a page load and go to the anchor but there's no straight forward way of doing this. So for now I think I'm just going to avoid using same page anchors in the pop menu and maybe create some dedicated pages for the content instead. Don't worry about it, it's not worth a complex solution but thanks for the suggestions.
1 Attachment(s)
Re: Anchor links close popup layer problem
Hi Tom, perhaps this will help, it's based on a xar file created by Siran. Does it meet your requirements?
Re: Anchor links close popup layer problem
Don't think it helps Egg but thanks. It looks like that file is for navigating to anchors on other pages from a popup which I have working already but the problem I have is when a link on the popup layer goes to an anchor on the same page and making the popup close when you click the link. Being able to combine popup:close with a working link somehow would have been nice but I don't think it's possible without a lot of trouble so going to avoid it for now.
1 Attachment(s)
Re: Anchor links close popup layer problem
Okay Tom. Here's a single page example that links to a layer 'pop-ups' with anchors that work and remain open.
Re: Anchor links close popup layer problem
Not quite what I'm looking for. I need the anchors on the Mouse Off layer for always visible page content and the popup menu needs to close when clicking the links not remain open.