kollapsminoriteten/wp-content/plugins/jetpack/modules/widgets/gallery/js/gallery.js

13 lines
436 B
JavaScript
Raw Normal View History

2020-09-15 14:30:05 +02:00
( function ( $ ) {
2019-11-15 23:26:29 +01:00
// 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
2020-09-15 14:30:05 +02:00
$( 'body' ).on( 'click', '.widget-gallery .no-carousel .tiled-gallery-item a', function (
event
) {
2019-11-15 23:26:29 +01:00
// Have to trigger default, instead of carousel
event.stopPropagation();
return true;
} );
} )( jQuery );