| @@ -1,0 +1,14 @@ | ||
| 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( | |
| 5 | + 'click', | |
| 6 | + '.widget-gallery .no-carousel .tiled-gallery-item a', | |
| 7 | + function ( event ) { | |
| 8 | + // Have to trigger default, instead of carousel | |
| 9 | + event.stopPropagation(); | |
| 10 | + | |
| 11 | + return true; | |
| 12 | + } | |
| 13 | + ); | |
| 14 | +} )( jQuery ); | |