diff options
Diffstat (limited to 'plugins/jetpack/modules/widgets/gallery/js/gallery.js')
-rw-r--r-- | plugins/jetpack/modules/widgets/gallery/js/gallery.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/widgets/gallery/js/gallery.js b/plugins/jetpack/modules/widgets/gallery/js/gallery.js new file mode 100644 index 00000000..5b952bb4 --- /dev/null +++ b/plugins/jetpack/modules/widgets/gallery/js/gallery.js @@ -0,0 +1,10 @@ +( function( $ ) { + // Fixes a bug with carousels being triggered even when a widget's Link To option is not set to carousel. + // Happens when another gallery is loaded on the page, either in a post or separate widget + $( 'body' ).on( 'click', '.widget-gallery .no-carousel .tiled-gallery-item a', function( event ) { + // Have to trigger default, instead of carousel + event.stopPropagation(); + + return true; + } ); +} )( jQuery ); |