gallery.js 421 B

12345678910
  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( event ){
  5. // Have to trigger default, instead of carousel
  6. event.stopPropagation();
  7. return true;
  8. });
  9. })(jQuery);