Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1

    Default Click to close layers

    I've posted about this page on a website before but this is a slightly different issue. I have a list of words on the left that, when clicked, each triggers a popup layer. Previously the issue was that if you clicked anywhere on the layer, it closed (which is what it's supposed to do I know) but my client wasn't happy with that. So I have a transparent layer on the mouse off layer that links to a "back to top" anchor. I also linked all the text on that layer to the "back to top" anchor

    Issue #1 - When I group all the text on the layer then the "back to top" anchor works fine. But I can't group it due to text is needed for SEO. So when I ungroup it, if you run your mouse over the text at the bottom of the layer, you can see spots in between the rows of words where the "back to top" isn't working. This wouldn't bother most people but my client isn't happy with that. The only other work around I can think of is to cover the entire popup layer with a transparent box. Dumb question ... if I cover text with a transparent box does that hide it from SEO? I wouldn't think so but need to be sure.

    Issue #2 - If you click on the list to the left to open a popup layer ... then scroll down ... then click another item on the list to the left (without scrolling up first) it doesn't bounce you back to the top of the new popup layer. Can you think of any way to resolve this? I don't see how to link a word to a popup layer and a "back to top" anchor at the same time.

    Here is a temporary folder where you can view the website. I ungrouped the text on the Office layer so you can see the difference.
    http://www.casteendesign.com/bc/projects.htm


    Help is greatly appreciated!

  2. #2
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    35,670

    Default Re: Click to close layers

    For issue #1 Select the photo and the text and Arrange > Apply Soft Group. This way the text remains editable and searchable.

    I am not sure what can be done with your second question. Maybe one of the members will have a script you can use. The problem is the layer positions are fixed so when a visitor scrolls down the page the layer is showing in the same position but is no longer visible.

    Very nice site design by the way. Love Duluth Trading Co., though I have to purchase from the catalog.
    Gary W. Priester
    Mr. Moderator Emeritus Dude
    , Sir

    gwpriester.com | Custom-Stereograms.com | eyeTricks on Facebook






  3. #3
    Join Date
    Oct 2006
    Location
    StPeters, MO USA
    Posts
    9,099

    Default Re: Click to close layers

    The second time I opened the site it said EDIT:Project select a type but the first time it didn't show at all except for what my graphic shows.

    Click image for larger version. 

Name:	web page.png 
Views:	26 
Size:	76.2 KB 
ID:	119448
    Larry a.k.a wizard509

    Never give up. You will never fail, but you may find a lot of ways that don't work.

  4. #4

    Default Re: Click to close layers

    What a nice compliment gwpriester. Thank you. And thanks for the tip ... what a time saver to use the soft group function if the text is still searchable.

  5. #5

    Default Re: Click to close layers

    wizard509 - what you are seeing is part of the problem I believe. When you first visit the page I have some text that flies in from the right. If you are already down on the page and click on the list on the left then it doesn't bounce back up to the top so what you saw was just a piece of the text above. That's the problem .. I want a "bounce back to top" effect each time a selection on the left is clicked. Those words on the left are already triggering a popup layer. Trying to find a way that they can also trigger a bounce back to the top effect.

  6. #6
    Join Date
    Aug 2000
    Location
    Placitas, New Mexico, USA
    Posts
    35,670

    Default Re: Click to close layers

    I was hoping someone might have a script or suggestion. Lemme see if I can get some responses here.
    Gary W. Priester
    Mr. Moderator Emeritus Dude
    , Sir

    gwpriester.com | Custom-Stereograms.com | eyeTricks on Facebook






  7. #7
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    748

    Default Re: Click to close layers

    Not sure if I understand what the requirement is, but something similar might have been discussed in this THREAD. But unfortunately the latest example has stopped working in V12.
    The example below is similar to that last example. It has a placeholder on the pop-up layers that contains some code that checks twice a second if the pop-up layer just became visible and if so scrolls to a position defined in the placeholder body code. Layer 1 scrolls to 0, layer 2 to 100 and layer 3 to 200, otherwise the placeholder code is identical.
    This method has a disadvantage. It only scrolls at the first click. It doesn't recognize a second click and doesn't scroll again...
    Attached Files Attached Files

  8. #8
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    748

    Default Re: Click to close layers

    Here is s light variation that doesn't need changing the code. Just move the placeholder to where you want the pop-up layer to be scrolled.
    Attached Files Attached Files

  9. #9
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    18,461

    Default Re: Click to close layers

    Great solution Siran, thanks for sharing.
    Egg

    Intel i7 - 4790K Quad Core + 16GB Ram + 232 GB SSD
    Xara Designer Pro X 16

  10. #10
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    748

    Default Re: Click to close layers

    And here is another variant. It is a bad hack but it also scrolls at second and subsequent clicks. Works quite different from the previous examples.
    Still everything is at the placeholder. You don't need to change the code, just move the placeholder around.
    Works in V12, V11 and even in V10 (except for the stickies).
    It requires JQuery for the smooth scrolling, so the placeholder has the name UsesJQuery attached.
    The placeholder also has a name htmlclass=xpul_st01 attached. This is used to identify the object from which to calculate the scroll position.
    There is a dummy body code at the placeholder (only a dot in this case). This is only required for the object to be exported at all.
    The relevant part is at the placeholder head code. If you change the code, make sure to change it in exactly the same way on all layers you use it on. Otherwise Xara will duplicate the code and that will quite surely result in a mess...
    Attached Files Attached Files

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •