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

10 lines
421 B
JavaScript
Raw Permalink Normal View History

2017-01-12 23:10:07 +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);