Welcome to TalkGraphics.com
Results 1 to 7 of 7
  1. #1

    Default How to make the same button open and close a popup

    Ive got a menu button on a mobile site.

    How do i make the same button open the popup layer and then close the popup layer when its clicked a second time?

    The layer only closes when you click somewhere else on the page

    Thank you

  2. #2
    Join Date
    Aug 2010
    Posts
    533

    Default Re: How to make the same button open and close a popup

    Hi Megg, place popup: "mypopup" close "mypopup" in the button link changing mypopup to the popup layer name

  3. #3
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,814

    Default Re: How to make the same button open and close a popup

    James, tried it and it stubbornly fails to work for me.
    Any chance you can upload an example?

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  4. #4
    Join Date
    Aug 2010
    Posts
    533

    Default Re: How to make the same button open and close a popup

    My bad! that only works with multiple popups
    You would need to duplicate your button onto the popup layer and place popup:close in the link
    popup_open-close.xar

  5. #5

    Default Re: How to make the same button open and close a popup

    Thought that might be the only way James. Thanks. Ive done it this way.

    when its the popup close ive had to put a white box around the menu icon and group it (to make it larger), as otherwise the screen tries to zoom in on it, which it doesnt do when its being used to open the menu, only when the same icon is used to close it. But problem solved.

  6. #6
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,814

    Info Re: How to make the same button open and close a popup

    I did this some time ago with jQuery, which was overkill.
    This approach here uses a normal call to open a layer and popup:close on a separate button on the called layer to close it.

    The extra is the CSS Placeholder that hides the close icon so the only way to close the layer is the button.

    CSS3 - Toggle Button.web

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  7. #7
    Join Date
    Apr 2015
    Location
    England
    Posts
    6

    Default Re: How to make the same button open and close a popup

    Thank you! The popup: close works brilliantly, and I didn't realise I needed new layers for a popup, so have no managed to make so!

 

 

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
  •