• I’ve tried to activate the AJAX link on both a development site and production site on two different servers with the same results. The screen darkens, the modal appears for a few seconds without text or input field, then disappears. Have tried it as shortcode [subscribe2 link=”Click here to subscribe”] and as a widget, with default WP 2016 theme and no other plugins. Do you have any idea what’s happening?

    Thanks for your help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • @belladog

    I suspect this is due to the modal form being displayed half way down the page.

    Probably due to theme CSS or more likely changes in jQueryUI since the feature was introduced.

    Thread Starter BellaDog

    (@belladog)

    Thanks for your reply!

    I’ve tried it with several different themes without any luck, so the jQueryUI issue is probably the problem. And that means, at least for now, that the AJAX link just isn’t functional, right?

    @belladog

    It looks that way at the moment.

    @belladog

    If you are comfortable editing code I may has a fix for you to try. Let me know.

    Thread Starter BellaDog

    (@belladog)

    I appreciate your looking into this. Yes, I can edit code.

    @belladog

    Okay, there are a few steps to this, here goes.

    In the subscribe2 plugin folder fine the include/ folder and then the s2-ajax.js file, open it for editing (maybe create a backup first).

    Around line 8 there is a line like this:
    s2jQuery( 'a.s2popup' ).click( function(){

    Change that to:
    s2jQuery( 'a.s2popup' ).click( function( event ){

    Then, just after the line:
    dialog.dialog( 'open' );

    Add this line:
    event.preventDefault();

    Save that file.

    New we need to create a minified version, so copy the entire contents of this file you’ve edited and go to a Javascript Compressor site. Paste the code and compress it and then save the output to the s2-ajax.min.js file in the same folder as above.

    Then, force reload your site (usually press and hold shift while reloading in your browser) and try the feature again.

    Thread Starter BellaDog

    (@belladog)

    That works! (Seems to work only with the default dark UI theme, which is fine with me–just FYI).
    Thanks so much for your help on this!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘AJAX link’ is closed to new replies.