Okay
  Public Ticket #1285007
Popup
Closed

Comments

  • Richard Huang started the conversation

    Hello There, I like you product very much, specially the New Popup feature, but I am hope that I will able to click on button and popup show up, not just show up every time I am at the page, please see the page https://layerslider.kreaturamedia.com/features/popups/ some thing like that. I wish to control with button. Can we do that?


    Thanks,

    Ricky

  • [deleted] replied

    Hey Ricky,

    If you want to trigger the popup with a button (layer) inside the slider, you will need to enter the following line to the Open By Click field: #example 
    And then set an ID in the Link & Attributes tab, for the same button (layer) with the same name, so id="example"

    Naturally the trigger button can be any element on your site, including external sources. You will need to apply the same method. Set an ID or class for that button (element) and enter the same ID/class to the Open By Click field.

  • Richard Huang replied

    Thanks, but I did, nothing really happen, Do I need to have slider on in same page? a sample code would really help. I have another question is my popup slider always automatic on, but can I set it to manual on? Thank a lot!

  • [deleted] replied

    Yes, you will have to load the slider to your site the same way, even if it's a popup slider. Otherwise the plugin can't display it.

    You can control the start of the popup in the Slider Settings -> Popup -> Launch section. You can leave the automatic trigger fields empty and use the Open By Click to start it manually only.

  • Richard Huang replied

    Thank you Attila, but I still not get on Open By Click on external sources. Example, I want to create a button to control open the popup slider, and by the Slider Settings -> Popup -> Launch section-> open by click with "open-popup-conversation", what is the Script Code can control it? could you please provide a sample code? Thank you so much!


  • [deleted] replied

    There isn't really a code example for this other than what I have already provided. That is all you will need to make it work.

    So again, if you want to trigger the popup with a layer from a slider, you will need to enter the following line to the Open By Click field: #open-popup-conversation  (the hashtag has to be added, as it is an ID selector).
    And then set an ID in the Link & Attributes tab with the ID field, for the layer, with the same name:  open-popup-conversation (without the hashtag, as it's only an attribute).

    With this setup, that layer will trigger the popup when clicked on. Please also make sure to add any slider that you want to use (the popup as well) to the page.