PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 2.2.10
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v2.2.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
← All changes | public/assets/js/scripts.js +17 -14 2.4.17 → 2.2.10 View file →
@@ -4,9 +4,13 @@
4 4
5 5 var pcp_container = $(this),
6 6 pcp_container_id = pcp_container.attr('id'),
7 7 PCP_Wrapper_ID = '#' + pcp_container_id,
8 + // pc_sid = $(PCP_Wrapper_ID).data('sid'), // The Shortcode ID.
8 9 pcpCarousel = $('#' + pcp_container_id + ' .sp-pcp-carousel'),
10 + /* pcpfilter = $('#' + pcp_container_id + '.pcp-filter-wrapper'),
11 + ajaxurl = sppcp.ajaxurl,
12 + nonce = sppcp.nonce, */
9 13 pcpCarouselData = pcpCarousel.data('carousel');
10 14 if (pcpCarousel.length > 0) {
11 15 // Carousel Swiper for Standard mode.
12 16 var pcpSwiper = new Swiper('#' + pcp_container_id + ' .sp-pcp-carousel', {
@@ -16,9 +20,8 @@
16 20 loop: pcpCarouselData.loop,
17 21 loopFillGroupWithBlank: true,
18 22 autoHeight: pcpCarouselData.autoHeight,
19 23 simulateTouch: pcpCarouselData.simulateTouch,
20 - freeMode: pcpCarouselData.freeMode,
21 24 allowTouchMove: pcpCarouselData.allowTouchMove,
22 25 centeredSlides: pcpCarouselData.center_mode,
23 26 mousewheel: pcpCarouselData.slider_mouse_wheel,
24 27 lazy: pcpCarouselData.lazy,
@@ -114,22 +117,22 @@
114 117 if (pcpCarouselData.autoplay === false) {
115 118 pcpSwiper.autoplay.stop()
116 119 }
117 120 if (pcpCarouselData.stop_onHover && pcpCarouselData.autoplay) {
118 - $(pcpCarousel).on({
119 - mouseenter: function () {
120 - pcpSwiper.autoplay.stop();
121 - },
122 - mouseleave: function () {
123 - pcpSwiper.autoplay.start();
124 - }
125 - });
121 + $(pcpCarousel).hover(
122 + function () {
123 + pcpSwiper.autoplay.stop()
124 + },
125 + function () {
126 + pcpSwiper.autoplay.start()
127 + }
128 + )
129 + }
130 + $(window).resize(function () {
131 + pcpSwiper.update()
132 + })
133 + $(window).trigger("resize")
126 134 }
127 - $(window).on('resize', function () {
128 - pcpSwiper.update()
129 - })
130 - $(window).trigger("resize")
131 - }
132 135
133 136 /**
134 137 * Grid masonry.
135 138 */