This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Omphaloskepsis/plugins/jetpack/modules/widgets/gallery/js/gallery.js

10 lines
421 B
JavaScript
Raw Normal View History

2018-03-21 18:19:20 +00:00
(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);