# jetpack/16.3-a.5/modules/widgets/gallery/js/gallery.js

Jetpack – WP Security, Backup, Speed, &amp; Growth, version 16.3-a.5. 15 lines.

- Page: https://pluginprobe.com/plugins/jetpack/16.3-a.5/code/modules/widgets/gallery/js/gallery.js
- Raw: https://pluginprobe.com/plugins/jetpack/16.3-a.5/raw/modules/widgets/gallery/js/gallery.js
- Modified: 2024-12-16T14:21:56+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/jetpack/16.3-a.5/code/modules/widgets/gallery/js/gallery.js#L10-L20`.

```javascript
( 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 );

```
