Okay
  Public Ticket #1223300
jQuery Selector to trigger popup on click
Closed

Comments

  •  3
    Word2Art started the conversation

    Please can you explain how I go about having a popup trigger on a click as this is not clear in the Layerslider documentation.  I'm not sure what to put in the field that requires a "JQuery Selector" to trigger the popup on a click.

  • [deleted] replied

    Hey Word2Art,

    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.

  •   Word2Art replied privately
  • [deleted] replied

    I have logged in with the provided credentials but this user does not seem to have any admin rights. We cannot access LayerSider either. Could you please set it so we can access plugins to investigate if there is an incompatibility.

  •  3
    Word2Art replied

    That's really strange, as I've just double checked and this user has admin status.  I logged in fine with these details.  Anyway, I've resaved and generated a new password:

    lbC1QS1JisFisz*DOsHi9PC3

    This one definitely works.

    Hopefully that will work for you now.  If not, I'll create a new user.

    Regards

    Sharon

  •  3
    Word2Art replied

    Looks like the issue is with Layerslider not updating their files - see attached console screenshot.  I really hope you can fix the issue asap as I've lost literally days of progress trying to sort this issue out.

  • [deleted] replied

    Dear Sharon,

    There is no such issue in LayerSlider. The problems you are experiencing are caused by the incorrect settings you have applied in the Advanced settings section.

    It is clearly stated in this tab, that you shouldn't change these options without experience as incorrect settings might break your site. Please do not switch them without a good reason to avoid problems like this.

    I have set them back to default, leaving only the markup caching enabled and your site is working properly again.

  •   Word2Art replied privately
  •  3
    Word2Art replied

    Hi Attila,

    I still have the remaining issue that I can't get a popup triggered using a button in a slide from a different layerslider.  Is it possible to do this, and if so, please can you walk me through the process?

    The "collaborate" button on the homepage slider (from [layerslider id="home"] is the desired click trigger.  Its class is ".button.secondary.is-outline" which is what I put in the open by click field in layerslider is #98 (Collaborate Popup).

    I look forward to your advice.

    Also, your kreatura.ticksy.com keeps throwing bad gateway errors when I try to open a new ticket.


  • [deleted] replied

    Hey Word2Art,

    The code you wrote seems to be valid, but unfortunately I cannot confirm it on your site as the code seem to be removed since then.

    One thing to note, you need to pull both sliders (the popup as well) to the same page for this setup to work.

  •  3
    Word2Art replied

    Hi Attila,

    I did have both the shortcode for the popup and the shortcode for the main slider on the one page.  While waiting for your response., I had to find a temporary workaround - I made the button a link instead.  However, I'm finding that the links don't play nicely with my theme (Flatsome), and I'm having to use a plugin to correct the over-scrolling to an unwanted point on the page.

    Is it possible for you to try getting the popup to work from the slider using the details I provided in a previous reply below as I've had no joy?  I'd really love to be able to use this method.

    Many thanks in advance.

  • [deleted] replied

    In this case please set up a test page with the mentioned two sliders where we can check on this problem to see what's wrong.

  •   Word2Art replied privately
  • [deleted] replied

    I have logged in and adjusted your settings to solve it.

    I have added .openpopup to the Open by click field of the popup. This means that the popup will wait until an element with an openpup class is clicked.

    After this, I have created a new attribute for the get in touch button in the Link & Attributes -> Custom Attributes section. This new attribute's name is class and its value is openpopup (without a dot). And it is interpreted on the parent element.

  •  3
    Word2Art replied

    Attila,

    Thank you so so much!  Great that I now have a working example that I can follow when creating other popups.

    Love the plugin - it's come so far and can do so many amazing things :-)