• I’ve been using your Twenty20 Image Before After plugin on a couple of websites. Thank you for this wonderful plugin.

    But I’m having a before-after slider load issue after the recent changes. The image load behavior has become unpredictable. Sometimes it loads perfectly, other times only a few of the slider loads while sometimes none of the slider loads at all.

    I tracked the changelog and saw that you’ve made this change: https://plugins.trac.www.ads-software.com/changeset/2696600

    It is correct to fix the uncaught TypeError, but you need to wrap jquery code in ‘window.on(“load”, function(‘ like before instead of ‘jQuery(document).ready(function($)’ for it to function predictably. I have currently manually placed the following code to solve both of the issues.

    $output .= ‘<script>jQuery( document ).ready(function( $ ) {‘;
    $output .= ‘$(window).on(“load”, function() {‘;

    I hope the next version will implement this code so that the intermittent slider load issue does not occur.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Can you please give more info on this? I’m having the same problem. It load properly then the browser resizes…. I just don’t understand it.

    here is a link to my staging site where the problem exist
    https://37r.c54.myftpupload.com/plastic-surgery-procedures/breast-augmentation/

    @sakibmoon – Thank you for the solution!

    @usachucker – To implement the fix from sakibmoon, you’ll need to edit a plugin file located at /wp-content/plugins/twenty20/inc/twenty20-shortcode.php. Although it’s not usually recommended to edit plugin files, this is the only way to fix the plugin until the author releases a new version.

    Add this line below line 75, so it becomes the new line 76:
    $output .= '$(window).on("load", function() {';

    I also had to add the closing bracket and parenthesis with a semicolon on line 93.
    $output .= '});});</script></div>';

    Thank you again sakibmoon for the fix!

    I just found this solution but it doesn’t seem to work for me. At least in Firefox the sliders are still not loading properly sometimes. Did anybody have the same problem and found a solution that fixed this?

    The problem is, as soon as I activate the console to look for errors, everythings works just fine. So I don’t know where to look for the specific problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Slider does not load properly after vs 1.5.8’ is closed to new replies.