Looking for support? You can access the support system via your account.
Laurent Mengin
Forum Replies Created
-
Laurent Mengin in reply to:
Ajax messing up Slick js script(Private) February 26, 2019 at 3:45 pm #203333Yes that did it ! Thank you !
Laurent Mengin in reply to:
Ajax messing up Slick js script(Private) February 26, 2019 at 3:30 pm #203325He’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(Private) February 26, 2019 at 12:16 pm #203296I copied it exactly as you pasted in my js file but no results.
Laurent Mengin in reply to:
Ajax messing up Slick js script(Private) February 26, 2019 at 12:02 pm #203288Like 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(Private) February 26, 2019 at 11:24 am #203284I 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(Private) February 26, 2019 at 11:14 am #203276It’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(Private) February 26, 2019 at 10:29 am #203269I’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:3Laurent Mengin in reply to:
Ajax messing up Slick js script(Private) February 26, 2019 at 8:03 am #203257The 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(Private) February 25, 2019 at 3:47 pm #203198This reply has been marked as private.Laurent Mengin in reply to:
AND Field relashionship not working(Private) February 11, 2019 at 8:39 am #201793Solution #2 worked perfectly thank you !
-
AuthorPosts