| 1 | ( function ( $ ) { |
| 2 | // Fixes a bug with carousels being triggered even when a widget's Link To option is not set to carousel. |
| 3 | // Happens when another gallery is loaded on the page, either in a post or separate widget |
| 4 | $( 'body' ).on( 'click', '.widget-gallery .no-carousel .tiled-gallery-item a', function ( |
| 5 | event |
| 6 | ) { |
| 7 | // Have to trigger default, instead of carousel |
| 8 | event.stopPropagation(); |
| 9 | |
| 10 | return true; |
| 11 | } ); |
| 12 | } )( jQuery ); |
| 13 |