Support Forums

Looking for support? You can access the support system via your account.

Laurent Mengin

Forum Replies Created

Viewing 10 posts - 1 through 10 (of 18 total)
  • Laurent Mengin in reply to:
    Ajax messing up Slick js script
    #203333

    Yes that did it ! Thank you !

    Laurent Mengin in reply to:
    Ajax messing up Slick js script
    #203325

    He’s a screen of the errors : https://i.ibb.co/mctpjVB/Capture-d-e-cran-2019-02-26-a-16-28-31.png

    And of the result : https://i.ibb.co/yVVQmfd/Capture-d-e-cran-2019-02-26-a-16-28-43.png
    It displays the images as if the slider js was not installed.

    Laurent Mengin in reply to:
    Ajax messing up Slick js script
    #203296

    I copied it exactly as you pasted in my js file but no results.

    Laurent Mengin in reply to:
    Ajax messing up Slick js script
    #203288

    Like that in the plugin or in the js file ? If in the js file should I change it to :

    jQuery(document).ready(function($){
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        $('.visuels-realisations').slick('unslick');
        $(".visuels-realisations").slick({
          dots: false,
          infinite: true,
          autoplay: false,
          autoplaySpeed: 10000,
          slidesToShow: 2,
          slidesToScroll: 1
        });
      });
    });

    Or leave it as is ?

    Because I tried on local to paste both your code and the one I pasted above un the js file and the sliders weren’t working anymore.

    Laurent Mengin in reply to:
    Ajax messing up Slick js script
    #203284

    I have this code in a separate js file where I initalize all jquery plugins :

    jQuery(document).ready(function($){
     
      $(".visuels-realisations").slick({
        dots: false,
        infinite: true,
        autoplay: false,
        autoplaySpeed: 10000,
        slidesToShow: 2,
        slidesToScroll: 1
      });
    
    });
    Laurent Mengin in reply to:
    Ajax messing up Slick js script
    #203276

    It’s a jQuery plugin but not a wordpress plugin. The js file is in the js folder (slick.js)

    Laurent Mengin in reply to:
    Ajax messing up Slick js script
    #203269

    I’ve installed the plugin and pasted the code but it didn’t change anything. Maybe the synthax is wrong. I also tried as said by the plugin :

    jQuery(document).ready(function( $ ){
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        $('.visuels-realisations').slick('unslick');
        $('.visuels-realisations').slick(getSliderSettings());
      });
    });

    But didn’t work either.
    Here’s the error from the console :

    Uncaught TypeError: Cannot read property ‘unslick’ of undefined
    at a.fn.init.$.fn.slick (slick.js?ver=1:3005)
    at HTMLFormElement.<anonymous> (?_sft_categories-projets=ouvrages-publics:334)
    at HTMLDocument.dispatch (jquery.js?ver=1.12.4:3)
    at HTMLDocument.r.handle (jquery.js?ver=1.12.4:3)
    at Object.trigger (jquery.js?ver=1.12.4:3)
    at Object.a.event.trigger (jquery-migrate.min.js?ver=1.4.1:2)
    at HTMLFormElement.<anonymous> (jquery.js?ver=1.12.4:3)
    at Function.each (jquery.js?ver=1.12.4:2)
    at a.fn.init.each (jquery.js?ver=1.12.4:2)
    at a.fn.init.trigger (jquery.js?ver=1.12.4:3

    Laurent Mengin in reply to:
    Ajax messing up Slick js script
    #203257

    The slider is indeed in the ajax section.

    My skills in jQuery are very limited, what are the skills_section / my-slide supposed to match ? Here’s my mark up :

    <div class=”contents”>
    <section class=”visuels-realisations”> <— This is the slider block targeted by the slick script
    <div>Image</div> <— These are the slides
    <div>Image</div>
    </section>

    <section class=”visuels-realisations”> <— This is the slider block targeted by the slick script
    <div>Image</div> <— These are the slides
    <div>Image</div>
    </section>
    </div>

    Laurent Mengin in reply to:
    Ajax messing up Slick js script
    #203198
    This reply has been marked as private.
    Laurent Mengin in reply to:
    AND Field relashionship not working
    #201793

    Solution #2 worked perfectly thank you !

Viewing 10 posts - 1 through 10 (of 18 total)