From 10d0db7b2b63b8462e0c98167799f6ac43dc7974 Mon Sep 17 00:00:00 2001 From: WPExplorer Date: Sat, 20 Aug 2022 00:30:42 -0700 Subject: [PATCH 1/2] Adds options to customize previous/next arrows. Allows greater customization of the next/previous arrows such as using inline SVG icons. --- dist/js/jquery.sliderPro.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dist/js/jquery.sliderPro.js b/dist/js/jquery.sliderPro.js index 2b5c495..61f9178 100644 --- a/dist/js/jquery.sliderPro.js +++ b/dist/js/jquery.sliderPro.js @@ -1058,6 +1058,12 @@ // Breakpoints for allowing the slider's options to be changed // based on the size of the window. breakpoints: null, + + // Previous arrow html. + previousArrow: '
', + + // Next arrow html. + nextArrow: '
', // Called when the slider is initialized init: function() {}, @@ -4679,8 +4685,8 @@ if ( this.settings.arrows === true && this.$arrows === null ) { this.$arrows = $( '
' ).appendTo( this.$slidesContainer ); - this.$previousArrow = $( '
' ).appendTo( this.$arrows ); - this.$nextArrow = $( '
' ).appendTo( this.$arrows ); + this.$previousArrow = $( this.settings.previousArrow ).appendTo( this.$arrows ); + this.$nextArrow = $( this.settings.nextArrow ).appendTo( this.$arrows ); this.$previousArrow.on( 'click.' + NS, function() { that.previousSlide(); @@ -6207,4 +6213,4 @@ JWPlayerVideo.prototype.replay = function() { this.player.play( true ); }; -})( jQuery ); \ No newline at end of file +})( jQuery ); From 4ef406732b93ae0f68303897a8a63548c24efb4c Mon Sep 17 00:00:00 2001 From: WPExplorer Date: Wed, 21 Feb 2024 19:34:16 -0800 Subject: [PATCH 2/2] Update jquery.sliderPro.js Fixes issue with slider width not being rounded while slider position is rounded causing potential issue where a tiny bit of the previous slide can be seen. --- dist/js/jquery.sliderPro.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/js/jquery.sliderPro.js b/dist/js/jquery.sliderPro.js index 3d432ad..82a9cf2 100644 --- a/dist/js/jquery.sliderPro.js +++ b/dist/js/jquery.sliderPro.js @@ -604,7 +604,11 @@ // Initially set the slide width to the size of the slider. // Later, this will be set to less if there are multiple visible slides. - this.slideWidth = this.$slider.width(); + if ( this.settings.fade === true ) { + this.slideWidth = this.$slider.width(); + } else { + this.slideWidth = Math.round( this.$slider.width() ); + } // Set the height to the same size as the browser window if the slider is set to be 'fullWindow', // or calculate the height based on the width and the aspect ratio.