I created a pop up layer with slide in from right, as soon as the home page loads.
I now want to be able to close the layer with a popup:close button but i can't remember how.
Thanks for any assistance.
I created a pop up layer with slide in from right, as soon as the home page loads.
I now want to be able to close the layer with a popup:close button but i can't remember how.
Thanks for any assistance.
Add (lock) to the end of the layer name. As in: layer_name(lock)
On the same layer, create a button, or icon, or whatever you want to close the layer.
In Web Properties Utilities > Web Properties > Link (tab) > Link To Web Or Email Address, type popup:close
Probably the best designed site I've ever made.
Just a button to open the layer, and a button to close. Check the layer name and the text in the link box.
>>> Andre7.xar <<<
If i open the layer with a button then the command "popup:close" works just fine. But if the layer open automatically with a reveal / scroll animation it can not be closed manually.
The "popup:close only works if i open the layer with a link.
What i missed or what i am doing wrong? Thanks for the xar example Chris but is not what i try to achieve. I need the layer to popup soon the home page load and then the visitor to be able to close manually. Thanks again
And your design is fab...
My next step would be to ask for your project file, but sorry to say it's late here and my bed is comfy.
I have embellished Chris's file.
I threw away the open popup layer button. It can still be used but is not relevant to the redesign.
I removed the (lock) popup layer name extension. Again, not needed.
I added a Name of 'btn' to the Close button.
I include some JS code in the Page Body:
<script> xr_v1(document.getElementById('btn').parentNode.pa rentNode); </script>
This enacts a Xara function call to open the pop-up layer that 'btn' is on on page load as if a button was pressed.
I added in a Link > Pop-up layer call to my renames 'aPopup' layer attaching that to the big shape on the 'aPopup' layer.
If you keep the original open popup layer button, this is not needed.
Andre7+1.xar
If you have a Variant you use the same approach but change 'btn' to 'btn-V' and use the same JS but for 'btn-V' in addition to the current arrangement.
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
Thank you very much Acorn. That's exactly what i was looking for.
As always you came to the rescue. Thanks again!
The approach works perfectly fine. But i don't seem to be able to get my head around, how to apply it on a variant.
Because the code applied on page HTML body, if i change the name to " btn-V " the name change on the main variant too.
I am sure is something simple and i appreciate if you can walk me through. Thanks for your time and your patience.
Right click on the button and Website Variants > Stop Sharing With Variants.
You should then be able to rename one without affecting the other.
Bookmarks